简单快捷实现ASP在线发邮件功能(二)
来源:网络整理 责任编辑:栏目编辑 发表时间:2013-07-01 19:39 点击:次
send "helo " && mmyname
case sfhelo
sflag = sffrom
send "mail from:" && getreal(mfrom)
case sffrom
if left(s, 3) 〈〉 "250" then goto srverr
//如果成功发送接收邮件地址
sflag = sfrcpt
send "rcpt to:" && getreal(mto)
case sfrcpt
if left(s, 3) 〈〉 "250" then goto srverr
//如果成功开始发送数据
sflag = sfdata
send "data"
case sfdata
if left(s, 3) 〈〉 "354" then goto srverr
sflag = sfsendover //数据包括4项,最后以 . 结束
send "from: " && mfrom
send "to: " && mto
send "subject: " && msubject && vbcrlf
send mtext
send "."
case sfsendover
if left(s, 3) 〈〉 "250" then goto srverr
sflag = sfstart
sendok = true
send "quit"
end select
exit sub
end sub
case sfhelo
sflag = sffrom
send "mail from:" && getreal(mfrom)
case sffrom
if left(s, 3) 〈〉 "250" then goto srverr
//如果成功发送接收邮件地址
sflag = sfrcpt
send "rcpt to:" && getreal(mto)
case sfrcpt
if left(s, 3) 〈〉 "250" then goto srverr
//如果成功开始发送数据
sflag = sfdata
send "data"
case sfdata
if left(s, 3) 〈〉 "354" then goto srverr
sflag = sfsendover //数据包括4项,最后以 . 结束
send "from: " && mfrom
send "to: " && mto
send "subject: " && msubject && vbcrlf
send mtext
send "."
case sfsendover
if left(s, 3) 〈〉 "250" then goto srverr
sflag = sfstart
sendok = true
send "quit"
end select
exit sub
end sub
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>