Lounge Network - Knowledge Base

  View Printer Friendly Version Search
KNOWLEDGE BASE HOME » 15. INFORMATION: SCRIPT AND PROGRAMMING QUESTIONS Viewing Answer
How do I send E-Mail from an ASP Page?

CDONTS has been deprecated by Microsoft in favor of CDOSYS on hosting plans on Windows 2003 Servers. This applies to both our Corporate and Business Hosting plans. CDO.Message is supported and JMail should also work. For a list of components that are installed on the Windows Servers click here.
Please see the following website for more information sending email through CDO

http://classicasp.aspfaq.com/email/how-do-i-send-e-mail-with-cdo.html



For other windows hosting plans that are still hosted on the windows 2000 server, you can still use CDONTS. The following is the actual ASP code that you can use to send an email from ASP page. Make sure that this website is hosted on a Windows 2000 web server. For Windows 2003 web servers, see the link above.

<%

Dim MyBody
Dim MyCDONTSMail

Set MyCDONTSMail = CreateObject("CDONTS.NewMail")


MyCDONTSMail.From= "my@from.email.address"
MyCDONTSMail.To= "my@to.email.address"
MyCDONTSMail.Subject="my subject"


MyBody = "my message body" & vbCrLf
MyBody = MyBody & "additional message body" & vbCrLf
MyBody = MyBody & "additional message body"


MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing


%>


KNOWLEDGE BASE HOME » 15. INFORMATION: SCRIPT AND PROGRAMMING QUESTIONS Viewing Answer




Knowledgebase Manager

© Copyright Lounge Network 2001-2017