If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > CDONTS not working

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-04, 20:02
luisymary luisymary is offline
Registered User
 
Join Date: Jan 2004
Posts: 10
Question CDONTS not working

Hi,

I am having trouble with the code below for sending an email. The user must select from a drop down menu the name to he will send the email, the dropdown is from a recorset, a table in the database contains the email address with the name.

I need to someone to check it to see if I am missing something, I already configure SMTP in my computer and try to test it on a readyhosting server but still not working. All the code is in the page that contains the form.

Do I need to declare variables for the test that is going to be send?

Thanks.


<% If Trim(Request.Form("submit")) <> "" Then %>

<%
Set Mail = Server.CreateObject("CDONTS.NewMail")
Mail.From = rsUserinfo.Fields.Item("Username").Value '(from users recordset, this is theyre email)
Mail.To = rsEmail.Fields.Item("emails").Value '(from emails recordset, in the page this is a drop down where the user selects to whom the request will be sent)
Mail.Subject = "SOME TEXT"
Reply With Quote
  #2 (permalink)  
Old 02-04-04, 20:32
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
Check to see if the email you send is in the queue:

C:\Inetpub\mailroot\Queue

If you can find the email in the queue, you need to check if something wrong with SMTP setting. If the email is not in the queue, that means there is something wrong with the code.
Reply With Quote
  #3 (permalink)  
Old 02-04-04, 20:40
luisymary luisymary is offline
Registered User
 
Join Date: Jan 2004
Posts: 10
Still not working

I check on the queque folder but its empty, at fisrt email were drop to the badmail folder but right now I think the code is not working because the any of the folders in mailroot have the emails.

The thing is that I want to send this information that is contained in a form, the form gets the info displayed from a MS database and the email address to whom email must be send is selected through a drop down menu at the end of the form. I don't know what's wrong with te code.


Quote:
Originally posted by gyuan
Check to see if the email you send is in the queue:

C:\Inetpub\mailroot\Queue

If you can find the email in the queue, you need to check if something wrong with SMTP setting. If the email is not in the queue, that means there is something wrong with the code.
Reply With Quote
  #4 (permalink)  
Old 02-05-04, 00:04
Patrick Chua Patrick Chua is offline
Registered User
 
Join Date: Jul 2003
Location: Penang, Malaysia
Posts: 212
If u have time to consider other options,
Try ready components for email sending instead of CDONTS, I use to have u'r problems b4, spend a few days debugging the problem,
then I never bother lookin back ( for now) when I used ASPEMAIL.

http://aspemail.com
__________________
Patrick Chua
LBMS ( Learn By My Self) NPQ ( No paper Qualification )
Reply With Quote
  #5 (permalink)  
Old 02-05-04, 10:54
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
Print out the subject, email body and the email address you want to sent to. Also you need to test your SMTP setting by sending out a normal email.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On