Click to See Complete Forum and Search --> : Pls help....how to send form content in email
newAyanami
10-23-2006, 09:20 AM
Hello...im new in asp.net and im trying to send the content of my form in email. I've tried to seach for a C# program but unfortunately it is all done in vb.net.
I've read about CDONTS and CDOSYS. The server OS is Win2003 pro.
Any help is appreciated.
trainstorm
10-30-2006, 03:28 AM
have you tried sending the form and then sending the variable from the retreived info? eg:
msg = "Dear Chap,"
msg=msg &vbcrlf& "Your user name is: "&request.form("uservar")
msg=msg &vbcrlf& "Your password is: "&request.form("passvar")
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "mail@trainstorm.co.uk"
objMail.To = uservar
objMail.Subject = "User Detail Alert"
objMail.Body = ""&msg&""
objMail.Send
Set objMail = Nothing
that's probably the easiest way, plus you can now post a web message that an email has been sent to them.
hope this helps,
TrainStorm (http://www.trainstorm.co.uk)