ASP Send E-mail
Keywords: ASP, Component Components
If you want to send E-mail with ASP, you need to install an A S P component. There are several parties of the third party manufacturers. You can use it. But under IIS4, you can use CDONTS. Although the name is strange, it is very easy to use and good performance. If you want to use it, please follow the next steps. 1. Check that you have installed SMTP services. Option Pack defaults to include SMTP services. After the SMTP service is installed, there will be a document called cdonts.dll in your system32 directory. 2. You can use the simple script with the lower surface through the A S P Send E-mail:
<% DIM MailObject Set MailObject = Server.createObject ("cdonts.newmail")
MailObject.send "11830@emil.com.cn", "11830@emil.com.cn", "My Subject", "My Text"%> Is it very simple?
A common feature of sending attachments CDONTS is used to send an attachment in e-mail. The code is not difficult to write. <% DIM MailObject Set MailObject = Server.createObject ("cdonts.newmail")
ATT_FILE = "c: /attachments/standardpolicy.txt" f_name = "policy.txt"
MailObject.from = "11830@email.com.cn" MailObject.to = "YouRemail@email.com.cn"
MailObject.subject = "Subject text Here" MailObject.body = "body text Here" MailObject.attachfile att_file, f_name
MailObject.send%>