How to send email via ASP account

 
Post new topic   Reply to topic    34SP.com Forum Index // Business ASP Hosting
View previous topic :: View next topic  
Author Message
imknight
Administrator
Administrator


Joined: 16 Mar 2001
Posts: 3627
Location: Stroud,Gloucestershire

PostPosted: Wed Jun 20, 2007 2:34 pm    Post subject: How to send email via ASP account Reply with quote
A simple code snippet demonstrating how to send an email can be found below, note the smtp port of 8025:

Code:

<%
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = "FROM@SERVEREMAIL.COM"
objMessage.To = "EMAIL@RECIPIENT.COM"
objMessage.TextBody = "This is some sample message text."
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 8025
objMessage.Configuration.Fields.Update
objMessage.Send

%>

_________________
Ian
34SP.com
Easy script installers for a small number of popular scripts are now available at http://scripts.34sp.com
Used our script installers? Please post your site here

| Wordpress Hosting |
Back to top
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Post new topic   Reply to topic    34SP.com Forum Index // Business ASP Hosting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Powered by phpBB © 2001, 2002 phpBB Group