ASP.Net Host

ASPMail sample code

Note to Aquest Hosting customers: ASPMail does not support SMTP authentication, so new customers can not use ASPMail for sending emails. This tutorial is for legacy purposes and for our long standing customers that are on servers that do not require authentication. Eventually we will stop supporting ASPMail altogether unless they come out with support for SMTP authentication.

The ASPMail component is used if you are using Classic ASP (NOT ASP.NET).

If you need to download the component for development use on your own computer, go to http://www.serverobjects.com/ and download the 30 day trial.

Here is a code sample. The only thing you will need to change is the To and From address in the code below. Use the RemoteHost that we have specified.

Note the following RemoteHost will not work until your code is on our server.

VBScript code:

strTo = "bob@email.com"
strFrom = "joe@somewhere.com"
strSub = "Hey"
strBody = "This is body"
'send ASPMail
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "hostmail.aquesthosting.com"
Mailer.AddRecipient "", strTo
Mailer.Subject = strSub
Mailer.BodyText = strBody
Mailer.FromAddress = strFrom
if Mailer.SendMail then
Response.Write "Mail sent..."
else
Response.Write "Mail send failure. Error was " & Mailer.Response
end if

You can find more details about the ASPMail component at http://www.serverobjects.com/

*This code is somewhat out of date. We now require all email to be authenticated. For some of our older customers (you signed up in 2003 or 2004), you may be able to use this because we don't require authentication from our early servers. New customers will not be able to use ASPMail because it does not support authentication. We assume you will probably be using ASP.Net anyway and it is easy to send mail from ASP.Net code.

0 Comments

We recommend Aquest Hosting for your ASP.Net 2.0 hosting, Community Server hosting, and DotNetNuke hosting.