Guest_imported
New member
- Jan 1, 1970
- 0
Hello,
I have an ASP page that contains a textfeald in which the user will have to enter his/her E-mail adress. I would need the rest of the code that would take this E-mail adress and send a pre-defined message back to the E-mail indicated in the form.
Here is my form code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="test.asp">
<input type="text" name="email">
Enter E-Mail
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
Here is the code I tried out by myself (test.asp), but with no success.
<%@ LANGUAGE="VBSCRIPT"%>
<%email = request.form("email"
Dim MyMail
Set MyMail = Server.CreateObject("CDONTS.NewMail"
MyMail.From = "justme@myaddress.com"
MyMail.To = " + email + "
MyMail.Cc = "friend3@address3.com;friend4@address4.com"
MyMail.Bcc = "friend5@address5.com;friend6@address6.com"
MyMail.Subject = "sending email via CDONTS NewMail"
MyMail.BodyFormat = 1
MyMail.MailFormat = 0
MyMail.Importance = 2
MyMail.Body = "Sending email with CDONTS NewMail" &_
"objects is easy! Try it!"
MyMail.Send , "youtoo@youraddress.com", "new subject"
Set MyMail = Nothing
%>
I installed IIS under Win2k and when I try to submit the form with Internet Explorer, it displays the code of "test.asp". But no mail arives at the submitted E-mail adress.
Do I have to open the asp page directly with my Browser? Under Win98 I used PWS and for the asp to work I had to run it from the program PWS.
How does it work with IIS???
Can someone please correct the code I used!!!
Thanks!
I have an ASP page that contains a textfeald in which the user will have to enter his/her E-mail adress. I would need the rest of the code that would take this E-mail adress and send a pre-defined message back to the E-mail indicated in the form.
Here is my form code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="test.asp">
<input type="text" name="email">
Enter E-Mail
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
Here is the code I tried out by myself (test.asp), but with no success.
<%@ LANGUAGE="VBSCRIPT"%>
<%email = request.form("email"
Dim MyMail
Set MyMail = Server.CreateObject("CDONTS.NewMail"
MyMail.From = "justme@myaddress.com"
MyMail.To = " + email + "
MyMail.Cc = "friend3@address3.com;friend4@address4.com"
MyMail.Bcc = "friend5@address5.com;friend6@address6.com"
MyMail.Subject = "sending email via CDONTS NewMail"
MyMail.BodyFormat = 1
MyMail.MailFormat = 0
MyMail.Importance = 2
MyMail.Body = "Sending email with CDONTS NewMail" &_
"objects is easy! Try it!"
MyMail.Send , "youtoo@youraddress.com", "new subject"
Set MyMail = Nothing
%>
I installed IIS under Win2k and when I try to submit the form with Internet Explorer, it displays the code of "test.asp". But no mail arives at the submitted E-mail adress.
Do I have to open the asp page directly with my Browser? Under Win98 I used PWS and for the asp to work I had to run it from the program PWS.
How does it work with IIS???
Can someone please correct the code I used!!!
Thanks!