关于basp21发送邮件需要smtp验证的问题。

简介: % response.write("") Set bobj = Server.CreateObject("basp21") ' ASP response.write(bobj.
  1. %
  2. response.write("
    "
    )
  3. Set bobj = Server.CreateObject("basp21") ' ASP
  4. response.write(bobj.Version())
  5. response.write("
    ")
  6. logname="C:\maillog.txt" ' Name full path of log file
  7. svname="smtp.126.com" ' Name of SMTP Server SMTP邮件服务器
  8. mailto="ddddxx2 " ' Reciever's mail address 接收邮件地址
  9. mailfrom="xxzz     user:pass" ' Sender's mail address 发送邮件地址,需要验证时用户名密码和Email之间用Tab键分隔,而basp21pro使用的是,分隔
  10. subj="Hello w/attached file" ' Mail Subject
  11. body="Hey, what's up ?" ' Mail Body
  12. files="x:\xxx.log" ' Attached Files 附加文件,没有附件时怎么写还没有确认
  13. rc=bobj.SendMail(svname,mailto,mailfrom,subj,body,files)
  14. if rc = "" then
  15.     response.write("send mail success")
  16. else
  17.     response.write(rc)
  18. end if
  19. response.write("
    "
    )
  20. %>

在需要SMTP验证时,basp21pro是用逗号(,)分隔邮件地址和用户名密码的,而basp21是使用Tab键分隔的。

而且mailto和mailfrom不能直接写邮件地址,而需要采用“xx xx@1x.com>”这样的格式。

目录
相关文章
|
2月前
|
Ruby
|
3月前
|
数据安全/隐私保护 Ruby
|
3月前
|
数据安全/隐私保护 Ruby
|
3天前
|
API 网络安全 数据安全/隐私保护
SMTP邮件邮箱API发送邮件的方法和步骤
使用SMTP邮件邮箱API(如AokSend)发送邮件涉及6个步骤:获取SMTP服务器地址和端口,进行身份验证,构建邮件内容,连接到服务器,发送邮件及处理结果。例如,Gmail的SMTP服务器地址是smtp.gmail.com,端口587。此方法适用于程序化发送邮件,确保安全并支持大规模发信服务。
|
5月前
|
网络安全 数据安全/隐私保护
用smtp发送邮件,语法错误,无法识别命令。 服务器响应为:Authentication is re
用smtp发送邮件,语法错误,无法识别命令。 服务器响应为:Authentication is re
94 0
|
8月前
|
网络安全 数据安全/隐私保护 Python
|
8月前
|
Python
|
8月前
|
Python
|
8月前
|
Python