View Full Version : asp opt in email submission

08-28-2005, 08:59 PM
I'm totally new to ASP and would appreciate any help the forum members can give me, I'm trying to create an opt in e-mail submission form but the ASP code that I have is for CDONTs which is no longer in use. What I want to do is have the e-mail addresses that are submitted sent to one of my own e-mail addresses.
This is the form that I am using (don't know if this will help)
but I really need help with the ASP code can anyone help me?

<form action="/aspmailer.asp" method="POST">
<input type="hidden" name="TGredirect" value="">
<font size="3">
<font color="#FF0000">
Join Our Monthly<br>
Mailing List</font><br>
<font size="2">
<font color="#ffffff">
Enter Your E-mail:</font><br>
<input type="text" name="email" size="20">
<input type="submit" value="Sign Up">

08-29-2005, 02:27 PM
Post the contents of your aspmailer.asp page and we can help.

08-30-2005, 04:24 PM
Sounds like you may have changed web hosts? Have you checked with your web host to see if they provide a different mailer script?

08-30-2005, 04:25 PM
CDOSYS Email (http://www.powerasp.com/content/new/sending_email_cdosys.asp)

08-30-2005, 10:44 PM
CDO is generally used instead of CDONTS on IIS 5 and after (actually the SMTP service within IIS) which is generally on servers after Win NT4 (although I think CDONTS is sometimes still supported too).

Here's a quickie memo to myself about converting my old CDONTS code to CDO:

o Change objCDONTS to be called objCDO (actually this is just a cosmetic change)

o This:
Set objCDONTS = Server.CreateObject("CDONTS.NewMail")

Changed to this instead:
Set objCDO = Server.CreateObject("CDO.Message")

o This:
objCDONTS.Body = strEmailBody

Changed to this instead:
objCDO.TextBody = strEmailBody

o This removed:
' Importance.
' (0=Low, 1=Normal, 2=High)
objCDONTS.Importance = 1