自己开发的email组件及说明、源文件(一上午没说话,终于搞定)

80酷酷网    80kuku.com

  mail组件MyEmail 1.0版使用说明

    MyEmial是我自己写的一个email组件,说实话,叫1.0版有点惭愧,因为有些

功能还未完善,现在的缺点是还不支持html格式,抄送及密送只能支持一个邮件

地址,不过我将在一两天内完成这些功能。

这个组件包括以下属性及方法:

属性:
MailServer : 你的邮件服务器,也可以是IP形式。
To:          收件人
From:        发件人
CC:          抄送
BCC:         密送
Subject:     邮件标题
Body:        邮件内容
Attachment:  附件     (目前只能发送一个附件)
IsHtml    :  是否html格式(目前不支持)
IfSuccess :  是否成功
ErrText :    出错原因

方法:
Send()   :   发送邮件

下面是一个在asp里使用这个组件的例子。
<% Language=VBScript %>
<%

   dim m_objMail    
   set m_objMail        = server.CreateObject ("MyEmail.Email")  
   m_objMail.MailServer = "server1.domain"                
   m_objMail.From       = "lypdomain"
   m_objMail.To         = "lypdomain"
   m_objMail.Subject    = "hello , just test my own email com "
   m_objMail.Body       = "just a text "
   m_objMail.Attachment = "d:/bizen/getcategory.sql"
   m_objMail.CC         = "lypdomain"
   m_objMail.BCC        = "lypdomain"

   //发送
   m_objMail.Send ()
   

   
   if m_objMail.IfSuccess  then
      Response.Write "发送成功!"
   else   
      Response.Write m_objMail.ErrText
   end if
   
   set m_objMail = nothing
%>         


下载地址:http://homepage.qdcatv.com.cn/bigeagle/myemail.zip

bigeagle

bigeagle163.net
http://bigeagle.yeah.net

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: