Send an e-mail with the Cdont component

Source: Internet
Author: User
E-Mail recently saw a lot of users to use the automatic e-mail discussion, this dongdong I have also studied it now published here, hoping to bring you useful:
<%
Fromwho=request ("fromwho")
Frommail=request ("Frommail")
Towho=request ("towho")
Tomail=request ("Tomail")
Subject=request ("Subject")
Content=request ("content")
Title=request ("title")
%>
<%
' Create a Cdonts.newmail object

Set Objmail=server.createobject ("Cdonts.newmail")
' Set the sender
Objmail.from=fromwho
Objmail.from=frommail
' Set recipient
Objmail.to=towho
Objmail.to=tomail
' Set the message subject
Objmail.subject=subject
' Set the content of the message
Objmail.body=content&title&towho&fromwho
' Format the message in HTML, without these two lines, the default is TXT format
' Objmail.bodyformat=0
' Objmail.mailformat=0
Objmail.send
%>
<%
Response.Write "<script Language=javascript>alert (' You have successfully mailed the!!! ');</script> "
Response.Write "<script language=javascript>window.location.href= ' vbscript:history.back ' </script>"

%>

This program has been tested through the



--------------------------------------------------------------------------------
Comments on this article [note: Here is only to give you a place to publish the views of the article itself, if you have questions, please go to the forum to raise] I want to ask!
Hyijiao 2003-10-14 11:33:00

Please ask how to change the following jmail to a ms.cdonts email? Thanks, thank you.
--------------------------------------------------------------------------------
Hello!

Please ask how to change the following jmail to a ms.cdonts email? Thank you!

Set JMail = Server.CreateObject ("Jmail.smtpmail")
jmail.serveraddress = "Mail.powercord911.com:25"
Jmail.sender = "Mis@powercord911.com"
Jmail.subject = "Your login password"
Jmail.addrecipient (Rsuserinfo. Fields.item ("UserEmail"). Value)
Jmail.body = "Respect the user Hello, first of all thank you for using our service!" & VbCrLf & VbCrLf
Jmail.body = jmail.body & "Your username is:" & (Rsuserinfo. Fields.item ("user_name"). Value) & VbCrLf
Jmail.body = jmail.body & "Your registered mailbox is:" & (Rsuserinfo. Fields.item ("UserEmail"). Value) & VbCrLf
Jmail.body = jmail.body & "Your login password is:" & (Rsuserinfo. Fields.item ("Fpassword"). Value) & VbCrLf
Jmail.body = jmail.body & "Please take good care of your password, such as the forgotten password again, please login to this site to retrieve your password, thank you for using this system." "& VbCrLf
Jmail.body = jmail.body & "Shun Zhu Regards!" "& VbCrLf
Jmail.body = jmail.body & "XXXXXX Co., Ltd."
Jmail.priority = 3
Jmail.addheader "Originating-ip", Request.ServerVariables ("REMOTE_ADDR")
Jmail.execute

In the above code, two lines of code:
jmail.serveraddress = "Mail.powercord911.com:25"
Jmail.sender = "Mis@powercord911.com"

MAIL.POWERCORD911.COM:25 is your outgoing mail server, 25 is the port number




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.