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
Send E-mails from your ASP Script
<%@ LANGUAGE="VBSCRIPT" %> <HTML> <HEAD> <TITLE>ASP Email Example Program</TITLE> </HEAD> <BODY> <% ' Create a mailman set mailman = Server.CreateObject("ChilkatWebMail2.WebMailMan") ' Any unlock code begins the 30-day trial. mailman.UnlockComponent "unlock_code" ' Tell the mailman where the SMTP server is located mailman.SmtpHost = "mail.earthlink.net" ' Some SMTP servers require a login/password 'mailman.SmtpUsername = "myLogin" 'mailman.SmtpPassword = "myPassword" ' Create an Email message set email = Server.CreateObject("ChilkatWebMail2.WebEmail") ' 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.