MailBee Objects是一个组件集合。您可以使用该控件创建并将邮件发送到SMTP服务器并从POP3服务器接收、解析以及删除电子邮件,还能在IMAP4服务器上管理电子邮件以及文件夹。它同样支持SSL以及S/MIME以获得更好的安全性能。MailBee控件能在ASP、VB、C++或任何支持ActiveX技术的语言中使用。
最新版MailBee Objects
简单的电子邮件
本示例发送不带附件的纯文本电子邮件。为简单起见,不使用SMTP身份验证,并且不执行错误检查。
Visual Basic:
Dim objSMTP' Create mailer componentSet objSMTP = CreateObject("MailBee.SMTP")' Unlock SMTP componentobjSMTP.LicenseKey = "put your license key here"' Set SMTP server nameobjSMTP.ServerName = "mail.server.com"' Set message propertiesobjSMTP.FromAddr = "me@mydomain.com"objSMTP.ToAddr = "you@yourdomain.com"objSMTP.Subject = "Hi"objSMTP.BodyText = "This is test message"' Send it!objSMTP.Send
ASP:
<% Dim objSMTP ' Create mailer component Set objSMTP = Server.CreateObject("MailBee.SMTP") ' Unlock SMTP component objSMTP.LicenseKey = "put your license key here" ' Set SMTP server name objSMTP.ServerName = "mail.server.com" ' Set message properties objSMTP.FromAddr = "me@mydomain.com" objSMTP.ToAddr = "you@yourdomain.com" objSMTP.Subject = "Hi" objSMTP.BodyText = "This is test message" ' Send it! objSMTP.Send %>
HTML邮件
本示例发送不带附件的HTML电子邮件,SMTP.BodyFormat是示例的关键属性。为简单起见,不使用SMTP身份验证,并且不执行任何错误检查。
Visual Basic:
Dim objSMTP' Create mailer componentSet objSMTP = CreateObject("MailBee.SMTP")' Unlock SMTP componentobjSMTP.LicenseKey = "put your license key here"' Set SMTP server nameobjSMTP.ServerName = "mail.server.com"' Set message propertiesobjSMTP.FromAddr = "me@mydomain.com"objSMTP.ToAddr = "you@yourdomain.com"objSMTP.Subject = "Message in HTML format"' Set HTML format for the bodyobjSMTP.BodyFormat = 1' Place HTML contents into the bodyobjSMTP.BodyText = "This word is bold"' Send it!objSMTP.Send
ASP:
<% Dim objSMTP ' Create mailer component Set objSMTP = Server.CreateObject("MailBee.SMTP") ' Unlock SMTP component objSMTP.LicenseKey = "put your license key here" ' Set SMTP server name objSMTP.ServerName = "mail.server.com" ' Set message properties objSMTP.FromAddr = "me@mydomain.com" objSMTP.ToAddr = "you@yourdomain.com" objSMTP.Subject = "Message in HTML format" ' Set HTML format for the body objSMTP.BodyFormat = 1 ' Place HTML contents into the body objSMTP.BodyText = "This word is bold"' Send it!objSMTP.Send%
来自文件的HTML电子邮件
该示例发送从HTML文件导出的HTML电子邮件。
如果HTML文件包含对图像,脚本,CSS文件和其他对象的引用,则它们将作为嵌入式附件与电子邮件一起嵌入。SMTP.ImportBodyText是示例的关键属性。为简单起见,不使用SMTP身份验证,并且不执行错误检查。
Visual Basic:
Dim objSMTP' Create mailer componentSet objSMTP = CreateObject("MailBee.SMTP")' Unlock SMTP componentobjSMTP.LicenseKey = "put your license key here"' Set SMTP server nameobjSMTP.ServerName = "mail.server.com"' Set message propertiesobjSMTP.FromAddr = "me@mydomain.com"objSMTP.ToAddr = "you@yourdomain.com"objSMTP.Subject = "Message in HTML format"' Export an HTML file into the e-mail messageobjSMTP.ImportBodyText "C:docsletter.htm", True' Send it!objSMTP.Send
ASP:
<% Dim objSMTP ' Create mailer component Set objSMTP = Server.CreateObject("MailBee.SMTP") ' Unlock SMTP component objSMTP.LicenseKey = "put your license key here" ' Set SMTP server name objSMTP.ServerName = "mail.server.com" ' Set message properties objSMTP.FromAddr = "me@mydomain.com" objSMTP.ToAddr = "you@yourdomain.com" objSMTP.Subject = "Message in HTML format" ' Export an HTML file into the e-mail message objSMTP.ImportBodyText "C:docsletter.htm", True ' Send it! objSMTP.Send %>
以上就是本次教程的全部内容,接下来会有更多相关教程,敬请关注!您也可以在评论留下你的经验和建议。除了本教程,想要了解更多电子邮件相关产品信息的可以点击此处查看。有更多教程资源等着你!
==========================================
如果想要购买正版授权MailBee.NET Objects的朋友,可以联系在线客服
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!