Forums

ASP

This topic is locked

MailForm

Posted 12 Oct 2005 01:40:08
1
has voted
12 Oct 2005 01:40:08 Christian Sen posted:
I got this Asp MailForm off the web, but I cannot seem to get it working.
Was using sendmail.asp before with cdonts, but the new ISP doesn't
support cdonts so I had to go for either CDO or ASPMail.

All though the script below is pretty tiny, I have not yet managed to
find the reason why it is not working:

<pre id=code><font face=courier size=2 id=code> &lt;%
DIM strName, strEmail
strName = request.form("Name"
strEmail = request.form("Email"

DIM Mailer, strMsgHeader, qryItem, strMsgInfo
Set Mailer = Server.CreateObject("SMTPsvg.Mailer"
Mailer.FromName = "My bad Inc"
Mailer.FromAddress= " "
Mailer.ReplyTo = strEmail
Mailer.RemoteHost = "mybad.com"
Mailer.AddRecipient "My Bad Inc", " "
Mailer.Subject = "My Bad Inc Website: Online Form"
strMsgHeader = "This mail message was sent from the My Bad Inc.com Online Form" & vbCrLf & vbCrLf
Mailer.BodyText = strMsgHeader & vbCrLf & "Email: " & Request.Form("Email" & _
vbCrLf & "Name: " & Request.Form("Name" & _
vbCrLf & "Email: " & Request.Form("Email"

IF Mailer.SendMail THEN
Response.Redirect ("thanks.asp"
ELSE
Response.Redirect ("nothanks.asp"
END IF
%&gt;</font id=code></pre id=code>

Have twisted my brain out on this one, but with no luck.
Any tip on this one or maybe suggestions on other MailForm-scripts
would be greatly appreciated.

Regards, Christian





Help is only a click away...
~~~~~~~~~~~~~~~~~
DWMX2004 | ASP | Access

Replies

Replied 12 Oct 2005 11:36:05
12 Oct 2005 11:36:05 Dave Thomas replied:
see if this helps christian. he explains about using CDO here.

www.paulsadowski.com/WSH/cdo.htm

regards

Dave Thomas
<b>DMX Zone Manager</b>
Replied 12 Oct 2005 12:25:31
12 Oct 2005 12:25:31 Wayne Hultum replied:
have you tried it using a valid to and from email address?
Replied 12 Oct 2005 17:00:31
12 Oct 2005 17:00:31 Christian Sen replied:
Yepp, Paul really seems to know what he's talking about.
I'm all eager to try out his examples.

Thank you for the link Dave! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

I did try using valid fields/values, Wayne, but still no luck.

Regards, Christian

Help is only a click away...
~~~~~~~~~~~~~~~~~
DWMX2004 | ASP | Access

Edited by - Sarre on 12 Oct 2005 17:02:58
Replied 12 Oct 2005 23:40:14
12 Oct 2005 23:40:14 andy bertaut replied:
Hi
I use formstogo and its amazing - it requires only a small amount of configuring, and can be made to work on asp or php. It does all of the hard work for you. It can use cdonts, aspmail, and cdo. check it out.
www.bebosoft.com/products/formstogo/
Replied 13 Oct 2005 10:12:12
13 Oct 2005 10:12:12 Christian Sen replied:
Thank you for the link. Andy!

Looks pretty neat, I will check it out <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>


Regards, Christian

Help is only a click away...
~~~~~~~~~~~~~~~~~
DWMX2004 | ASP | Access
Replied 15 Oct 2005 03:14:39
15 Oct 2005 03:14:39 andy bertaut replied:
Any time.

Reply to this topic