<%
'the author homepage: www.zuoxinwu.com
'author email:
[email protected], this program have doubt, please E-mail to contact the author,
ReceiveMail="496470673 @qq.com" 'receive mail E-mail, here is the author of this program mailbox, please change to your mailbox, you can use variables,
ReceiveMailbody=Request Form (" MailContent ") receives Form the contents'
Usermail=Request Form (" usermail ") receives Form the contents'
'you can pass the schematics of the custom form the other fields to expand, remember the code defined in the receiving form content,
If ReceiveMailbody="" then 'to determine whether a mail sent for back button,
% & gt;
E-mail: & lt; Input name="usermail" type="text" & gt;
Text content: & lt;/p>
|
<%
The else
Dim JMail
The set of jmail=server. CreateObject (" jmail. The message ")
Jmail. Silent=true
Jmail. Charset="gb2312" 'email literal encoding,
Jmail.=usermail 'the From user mailbox, received my email as the return address, you can use constants, can also use variables,
Jmail. FromName=usermail 'sender name, can use constants, can also use variables,
Jmail. Subject="email ASP test" 'the earth person all know, here is the title of the mail, you can use constants, can also use variables,
Jmail. AddRecipient ReceiveMail 'definition of recipient address
Jmail. Body="how are you, this E-mail from:" & amp; Usermail& VBCrLf 'use & amp; VBCrLf realizes the email body carriage returns,
Jmail. Body=jmail. Body& ReceiveMailbody& VBCrLf 'use & amp; VBCrLf realize the continuation of text content,
Jmail. MailServerUserName="563463582 @qq.com" 'email mailbox, please configure your email address,
Jmail. MailServerPassWord="* * * * * * * * * * *" 'email password, please configure your email mailbox password,
Issuccess=jmail. Send (" smtp.qq.com ") 'SMTP server, please configure your email SMTP server address,
'all three parameters correctly or not is a key to the success of email is
If issuccess then 'this program does not have the mailbox effectiveness judgment, but the email format is not correct, certainly can't send mail,
MSG="email sent successfully!" 'sent successfully the clues, can be set in the following pages, text format,
The else
MSG="send failed, please check the email address is correct!" 'send the clues, failure can be set in the following pages, text format,
End the if
Jmail. Close
The set of jmail=nothing
End the if
% & gt;
|