By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

Send to user in database

P: n/a
I have a page which i need sent via email when user hits submit button
here is an example of the CDo code i'm using which is not working.
Please help
<%

Dim objMessage

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

objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
= 2 'Send the message using the network (SMTP over the network).

objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "127.0.0.1"

objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25

objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl")
= False 'Use SSL for the connection (True or False)

objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 60

objMessage.Configuration.Fields.Update

With objMessage
..To = "cust_email"
..From = "Test <In**@testtest.net>"
..Subject = "Thank You"
..TextBody = "Name: " & Request("cust_name") & vbCRLF & vbCRLF &
"Email: " & Request("cust_email") & vbCRLF & vbCRLF & "Message: " &
Request("emailtext")
..Send
End With

Set objMessage = Nothing

%>
The fields in the form are obvious from the text body part of the
script. Any help apprciated.

Lizz

Nov 25 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Try http://www.trevor.easynet.co.uk/downloads/SendMail.zip

(write your own HandleError function or rem those lines out)

Then try having a problem with ms-access next time, that's what this
group is for <g>
Nov 26 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.