View Full Version : email messaging sytem that sends out asp coded files?

07-17-2007, 07:27 PM
i have a newsletter that has asp code within the file. i need to send this newsletter out via some sort of messaging system but, most messaging systems only allow html and not asp. does such a system even exist?

07-17-2007, 07:47 PM
If you use an ASP Mail system (CDOSYS, JMail, ASPEmail), then you can use ASP to build your ASP/HTML page and send it out that way.

Since email is not server-side, you cannot send ASP pages to email. If you try to use scripts, you will be listed as a SPAMMER or a hacker and put on blacklists. Scripts include JavaScript, WShell (Windows Scripting), and VBScript (outside of ASP).

Use one of the free clients above (my recommendation is ASPEmail, but some say JMail is better. CDOSYS is included with ASP and IIS 5/6, but the documentation is horrific) and use the IsHTML = true setting and send your email as HTML.


07-17-2007, 09:30 PM
Here's the code I use. For more examples check this site out.

Dim objCDO
Dim strFrom
Dim strTo
Dim strMessage

Set objCDO = Server.CreateObject("CDO.Message")

strFrom = "address@domain.com"
strTo = "you@domain.com"

strMessage = "This person was just registered.<br>Name - " & Request.Form("txtFirstName") & " " & Request.Form("txtLastName")

objCDO.From = strFrom
objCDO.To = strTo
objCDO.Subject = "New Registration"
objCDO.TextBody = strMessage

Set objCDO = Nothing