CDO Components Send mail

Source: Internet
Author: User
Originally used CDONTS components to send mail, since the server used 2003 system, found that the original function is not the spirit, the page prompted that the creation of the object is not successful. So I checked with the help of IIS, and helped to make it clear that in the 2003 system, the CDONTS components were removed and only the CDO components were retained. The CDO component is the parent component of the CDONTS. But many of the Web sites that use CDO components to send emails are examples of CDONTS components.
Let me make a list of the CDO components.
Set Cdomail=server. CreateObject ("CDO.") Message ") This is the key to creating the CDO component, not the CDONTS
' Cdomail. MailFormat =0 These attributes are available in CDONTS, but there is nothing in the CDO
' Cdomail. BodyFormat =0
Cdomail. From =mail
Cdomail. To= "Jaa@aacom"
' Cdomail. Bcc= "Sdfs@dfsdcom"
Cdomail. Subject =product ' "Request Information"
'//////////////////////////body content////////////////////////////
Message= "Name:" & name & "<br>"
Message=message & "Company:" & Company & "<br>"
' Message=message & ' Address: "& addr &" <br> "
' Message=message & ' Postal code: ' & Zip & ' <br> '
Message=message & "Phone:" & phone & "<br>"
' Message=message & ' Fax: "& fax &" <br> "
Message=message & "Request time:" & Ordertime & "<br>"
Message=message & "Request information:" & info & "<br>"
'///////////////////////////////////////////////////
Cdomail.htmlbody =message ' This is also the key part, and the original Body property is not the same
' Response. Write Product & "<br>"
' Response. Write & "<br>"
' Response.End
Cdomail. Send
Set cdomail=nothing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.