Forum Moderators: phranque
If you are still looking for some sample script i can help.
I actually have a few web pages running doing exactly what you want to do.
One is a registration form.....as soon as another person registers, i get an email. Its quite simple.
If you want i can send the script to you in a sticky email.
Still need it?
Webboy
Thank you for the offer. I found a copy of cdonts.dll, and registered on my winXP pro. The server that my site is hosted on uses cdonts also. I haven't had a chance to test it yet, but I plan to do so this evening. I believe that cdonts will do the job. I am always interested in script ideas. If you don't mind, please do send it to me. I will let you know how cdonts pans out.
Thank you for the gracious offer to help,
Bob
If Request.Form("Submit") <> "" Then
Const ws_Subject = "Results From Contact Form - Wood Moulding For Sale"
Const ws_ToEmail = "email@something.com"
Const ws_Redir = "Contact_thank_you.asp"
Dim ws_From
ws_From = Request.Form("Email_Address")
Dim ws_Body, ws_fieldName, ws_fieldValue, ws_i
For ws_i = 1 to Request.Form.Count
ws_fieldName = Replace(Request.Form.Key(ws_i),"_"," ")
ws_fieldValue = Request.Form.Item(ws_i)
ws_Body = ws_Body & ws_fieldName & ": " & ws_fieldValue & VbCrLf
Next
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")
'objCDO.From = ws_From
objCDO.To = ws_ToEmail
objCDO.Subject = ws_Subject
objCDO.Body = ws_Body
objCDO.Send()
Set objCDO = Nothing
Response.Redirect(ws_Redir)
End If
%>
Does anyone have any ideas why this is not working. I installed a copy of cdonts.dll into my windows/system32 directory, and registered in WinXp. SMTP is installed also. this seems to work, only I am not receiving any emails - IIS 5.1, and Win Xp.
Thanks,
Bob
Thank you all who took the time to look at this code. However, I found the problem to be an operator error (MINE). I was not entering the "from" email address when I submitted the form (I will make a default), and the email was being rejected by my email screener - not a valid email address in the "from".
thanks everyone,
Bob