发送电子邮件源码(支持ESTMP协议,超文本电子邮件格式)[6]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 dapha 的 blog

            case mail_pass
                 m_state = mail_login
                 winsock1.senddata (base64_encode(txtpwa)) & vbcrlf
                 statustxt = "发送人邮件地址"
            case mail_login
                 m_state = mail_from
                 winsock1.senddata "mail from:" & trim$(txtfrom) & vbcrlf
                 statustxt = "接收人邮件地址"
            case mail_from
                 m_state = mail_rcptto
                 winsock1.senddata "rcpt to:" & trim$(getaddress) & vbcrlf
                 statustxt = "邮件发送之中..."
            case mail_rcptto
                 m_state = mail_data
                 winsock1.senddata "data" & vbcrlf
                 statustxt = "获取邮件内容"
            case mail_data
                m_state = mail_dot
                winsock1.senddata "from:" & user.text & " <" & txtfrom & ">" & vbcrlf
                winsock1.senddata "to:" & toname & " <" & getaddress & ">" & vbcrlf
                winsock1.senddata strimeall & vbcrlf
                winsock1.senddata strime & vbcrlf
                winsock1.senddata "." & vbcrlf
                statustxt = "邮件送完毕"
            case mail_dot
                m_state = mail_quit
                winsock1.senddata "quit" & vbcrlf
                statustxt = "邮件成功发送!!!"
              case mail_quit
                 winsock1.close
                 statustxt = "待命之中..."
         end select
    else
         winsock1.close
    end if
debug.print strserverresponse
end sub

本文关键:电子邮件
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top