Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    10

    Question Unanswered: 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"

  2. #2
    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.

  3. #3
    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.


    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.

  4. #4
    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 )

  5. #5
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •