![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
ASP Email Script
<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<TITLE>How to send email in an ASP script.</TITLE>
</HEAD>
<BODY>
<%
' Create a mailman
set mailman = Server.CreateObject("Chilkat_9_5_0.MailMan")
' Any unlock code begins the 30-day trial.
mailman.UnlockComponent "unlock_code"
' Tell the mailman where the SMTP server is located
mailman.SmtpHost = "smtp.chilkatsoft.com"
' Some SMTP servers require a login/password
'mailman.SmtpUsername = "myLogin"
'mailman.SmtpPassword = "myPassword"
' Create an Email message
set email = Server.CreateObject("Chilkat_9_5_0.Email")
' Enter the recipient's information
email.AddTo "John Smith", "support@chilkatsoft.com"
' Enter the sender's information
email.FromName = "Joe Smith"
email.FromAddress = "joe.smith@somedomain.com"
' Enter the email subject
email.Subject = "Simple plain-text email"
email.Body = "This is a test"
' Sends the email with the patterns replaced.
if mailman.SendEmail(email) then
Response.write "Message sent successfully!<br><br>"
else
Response.write mailman.LastErrorHtml
end if
Set email = Nothing
Set mailman = Nothing
%>
</BODY>
</HTML>
|
|||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.