Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp mail

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i am VERY new at asp and have been trying to get an email working on it through my website.....i have tried numerous scripts i have found but all do the same thing they email me with a blank email and don't seem to be taking in the information the user is supposed to be putting into the form fields....i know i am doing something completely wrong....ANY help would be much appreciated..!
 
If you could post the code where you are setting the email fields from your form we could probably give you more specific help.
-Tarwn ----------------------
| if(u=getc(this)) |
| putc('\a'); |
----------------------
 
ok here is the code i found that my isp said to use as far as the asp is concerned
<%
Set Mailer = Server.CreateObject (&quot;SMTPsvg.Mailer&quot;)
Mailer.FromName = &quot;Cerberus Web Form&quot;
Mailer.FromAddress = &quot;questions@cb.com&quot;
Mailer.Subject = &quot;Email Form from Web&quot;
Mailer.BodyText = &quot;Sucessful Message&quot;
Mailer.RemoteHost = &quot;mail-fwd.verio-web.com&quot;

Mailer.AddRecipient &quot;Paul&quot;, &quot;paul@paul.com&quot;

if Mailer.SendMail then
' Message sent sucessfully
response.write (&quot;Your message was sent&quot;)
else
' Message send failure
response.write (&quot;Your message was not sent. &quot;)
response.write (&quot;The error was: &quot; & Mailer.Response)
end if

Set Mailer = Nothing
%>
 
I haven't used the SMTPsvg.Mailer object before, if you have a default mail account set up in outlook or outlook express you can try the CDONTS object:

<%
Dim objNewMail
Set objNewMail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)

objNewMail.From = &quot;me@myself.com&quot;
objNewMail.To = &quot;you@youraddress.com&quot;
'objNewMail.Cc = &quot;someone@somewhere.com&quot;
'objNewMail.Bcc = &quot;andHisBigRedDog@clifford.com&quot;
objNewMail.Subject = &quot;Subject&quot;
objNewMail.Body = &quot;Body of my message&quot;
'objNewMail.BodyFormat = 0
'objNewMail.MailFormat = 0

objNewMail.Send
set objNewMail = Nothing
%>

Theres a pretty in depth refernce at w3schools.com for the CDONTS object as well.
-Tarwn ----------------------
| if(u=getc(this)) |
| putc('\a'); |
----------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top