User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 426,803 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,879 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1462 | Replies: 4 | Solved
Reply
Join Date: May 2007
Posts: 60
Reputation: dudegio is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dudegio dudegio is offline Offline
Junior Poster in Training

Help sending e-mail with ASP

  #1  
Jul 9th, 2007
Hello everyone! Im new to ASP and this is my first time to work with it. Pls help me with my problem. I was given a tasks to edit an existing website (for 2 days only). One of those is sending e-mails based on a queried data from a database. The mail will be sent to the clients and the owner of the site. I have tried working on it but i have experienced error. pls help with my code. Below is my practice code.


PRACTICE CODE:

<%
dim msgMail as new MailMessage()
msgMail.To = "noel_c_cadiz@yahoo.com, dudegio@yahoo.com"
msgMail.From = "n.cadiz@spinweb.ph"
msgMail.Subject = "Email for Giraffe Stamps"
msgMail.Body = "Order Details
Stock Code: SG18
Stock Number : 193.018.2.3.1
Quantity: 1
Unit Price: $29.99
SHipping Price: $5
Total Price: $34.99
Total items: 1"

SmtpMail.SmtpServer="giraffestamps.com"
SmtpMail.Send(msgMail)
%>


ERROR:

Microsoft VBScript compilation error '800a0401'
Expected end of statement
/mailwithASP.asp, line 13
dim msgMail as new MailMessage()

Please help me troubleshoot and how am i going to do it. If you have the code the better. thanks. I very much appreciate any help. plsss... plsss... plsss...
Last edited by dudegio : Jul 9th, 2007 at 4:23 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Posts: 60
Reputation: dudegio is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dudegio dudegio is offline Offline
Junior Poster in Training

Re: sending e-mail with ASP

  #2  
Jul 10th, 2007
Hello guys!
This one works but it only sends to this mail: mailObj.AddRecipient n.cadiz@spinweb.ph but in yahoo, no mail has been sent. May you please help me to loacte the problem with my code? plssssssssss.....

Set mailObj = Server.CreateObject("JMail.SMTPMail")
mailObj.Silent = true
mailObj.ServerAddress = "mail.spinweb.ph"
mailObj.Sender = noel_c_cadiz@yahoo.com
mailObj.ReplyTo = noel_c_cadiz@yahoo.com
mailObj.Subject = "Giraffe Stamps - Order Details"
mailObj.AddRecipient n.cadiz@spinweb.ph
mailObj.Body = "Hello"
If not mailObj.Execute then
sendEmail = -1
else
SendEmail = 0
End If
Reply With Quote  
Join Date: Nov 2007
Posts: 12
Reputation: x2per14 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
x2per14 x2per14 is offline Offline
Newbie Poster

Re: sending e-mail with ASP

  #3  
Feb 9th, 2008
do you have a mail server? or ur iis o alowd to smtp?
Reply With Quote  
Join Date: Sep 2007
Posts: 1,057
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: sending e-mail with ASP

  #4  
Feb 11th, 2008
Set mailObj = Server.CreateObject("JMail.SMTPMail")
mailObj.Silent = true
mailObj.ServerAddress = "mail.spinweb.ph"
mailObj.Sender = noel_c_cadiz@yahoo.com
mailObj.ReplyTo = noel_c_cadiz@yahoo.com
mailObj.Subject = "Giraffe Stamps - Order Details"
mailObj.AddRecipient n.cadiz@spinweb.ph
mailObj.Body = "Hello"
The problem here is that your sender's, replyto, etc. is not within quotes. So it willl not recognize it. Also, you can only send 1 email to 1 address at a time.

Try replacing this line, with the following:
mailObj.AddRecipient n.cadiz@spinweb.ph

with

mailObj.AddRecipient "noel_c_cadiz@yahoo.com"
And remember, "sender" is just the name of the person 'sending' the email, and "replyto" is the email address of the 'sender'.

Recipients are the only ones who will receive the email, and you can only send it to one recipient at a time.
Reply With Quote  
Join Date: Nov 2007
Posts: 12
Reputation: x2per14 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
x2per14 x2per14 is offline Offline
Newbie Poster

Re: sending e-mail with ASP

  #5  
Feb 13th, 2008
try to look in yahoo mail spam.. i try this already and it i see it on spam.. not in inbox..
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 7:35 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC