Relax. ASP.NET Web Hosting without the hassles. Ring 1300 787 698
(
Skip Navigation Links : Knowledge Base : General Settings : Mail server to use in web site code

Mail server to use in web site code 

The Host/Server address to use when sending email through a web site, either in ASP, PHP, ASP.NET or Perl is "localhost".
No authentication is required.

Below is an example of how to use this from ASPEmail in ASP:


Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "localhost"
Mail.From = "my@my.com"
Mail.AddAddress "test@mylocalisp.com.au"
Mail.Subject = "This is a test"
Mail.Body = "This is an ASPEmail test"
Mail.Send


Below is an example of using CDO from ASP:


Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = "me@my.com"
objMessage.To = "test@mylocalisp.com.au"
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") = "localhost"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

objMessage.Configuration.Fields.Update
objMessage.Send
 

 

)