Click to See Complete Forum and Search --> : Sending Mail through Form


daneb
July 24th, 2000, 02:48 AM
Hello! I have an ASP file with a very simple form which is supposed to email the inputted data to the email address specified in its ACTION attribute. The form contains two textboxes (for the user's first and last name), a submit button and a cancel button. The form's METHOD is post.

I have loaded the file into my browser and tried if I can receive an email containing the data that I inputted. After typing something into the two textboxes and clicking the submit button, my Outlook opened. The email add appeared in the To: box and the cursor was inside the Subject: box. But the body of the mail was empty. After clicking the Send button, I received an email minutes later. The subject that I typed was there but the mail was empty. Why is this so? Aren't the data that I inputted supposed to be the content of the mail?

I tried using another machine and doing the same thing but nothing happened. This time, even the Outlook program didn't open. And I haven't received an email even once. I tried doing this 3 times.

Does anyone have a suggestion on how to make this work? Thanks in advance!

Lothar Haensler
July 24th, 2000, 03:56 AM
if you want a reliable solution for sendig emails that's independent of the mail client installed on the client, use server-side mail solutions like CDONTS (comes with IIS 4).
It allows you to take the data entered in your form and compose and send the eMail on the server.

daneb
July 24th, 2000, 04:29 AM
Thanks for the reply. But what I have used in my code are the things that I have read in most HTML & ASP books. One book even says that for mailing form data, the ENCTYPE attribute of the FORM tag must be set to "text/plain" and the METHOD must be set to "post". This seems to make it easy to do what these books say. But when I try it, I don't get the desired results. I thought that even an .HTM file can do this. Do you have anymore ideas?

Lothar Haensler
July 24th, 2000, 04:37 AM
>But what I have used in my code are the things that I have read in most HTML & ASP books.

That may be true, but in my experience most web sites do NOT use that approach. Because, most web authors cannot afford to be dependent on the eMail client.

zeza
November 3rd, 2002, 10:54 AM
the code works fine for the domain but it does not work if I would like to send to any email outside the domain ,it turn s to an error,would you please help