ASP Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

ASP Examples

ASP String
ASP Byte Array
Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
S/MIME
Socket
Spider
RSA Encryption
Tar
ASP Upload
XML
XMP
Zip Compression

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

ASP Email Script

Download Chilkat Email ActiveX for ASP and Applications

More ASP POP3 Examples

More ASP SMTP Examples

More ASP Email Examples

How to send email in an ASP 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.MailMan2")

	' 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.Email2")

	' 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>



Relevant keywords: ASP Tutorial, ASP Script, ASP Application, ASP Software, ASP Code, ASP Programming, ASP Component, ASP Email, ASP Help, ASP Example, ASP Source Code, ASP Developer, ASP Mail, ASP XML, ASP Sample

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2008 Chilkat Software, Inc. All Rights Reserved.