Click to See Complete Forum and Search --> : ASP Formmail Not working...


d.brandusa
02-14-2004, 03:08 PM
Hi, i'm new to asp and I've tried simple asp formmail and can't get anything to work, what am I doing wrong.

1st I have two form fields, "User" & "Problem"

The user form field is automatically filled in with the NT User Login name. The Problem field is the info they will provide to me.

What I want is when its submitted, I want it to take the "User" NT Login name and automatically add the @domain.com after it to show a complete reply to email. For instance, JDoe is what is put in the field, but when its submitted I want it to come back as JDoe@domain.com for the reply email. The "Problem" field I just want the text obvisouly in the body of the email. I normally do php but like I said, I know nothing about asp. Does anyone have a simple script that can do this? I need your help. The only thing I know about our servers is it has smtp active and it needs CDONTS for the script, which I don't know what that is. Thanks alot.

DB

buntine
02-14-2004, 04:48 PM
You will need CDONTS installed on your server.. Otherwise your script cannot work.

To construct the correct email address, make a variable and concatenate the NT username and '@domain.com' string.


dim user_email
user_email = CStr(request.serverVariables("LOGON_USER") & "@domain.com")


Check out the following URL for detailed descriptions on how to use CDONTS to send email.

http://www.powerasp.com/content/hintstips/asp-email.asp

Regards,
Andrew Buntine.

Bullschmidt
02-17-2004, 01:00 AM
www.asp101.com has some e-mail examples in the Samples section. The e-mail attachment example uses the more recent CDO instead of the outdated CDONTS.