CDONTS.DLL doesn't seem to work. 
Author Message
 CDONTS.DLL doesn't seem to work.

The following code in a vb script in an ASP page on my IIS server is
supposed to send out an e-mail message.

  Set objmail = CreateObject("CDONTS.NewMail")
  If Isobject(objmail) then
   Objmail.From  = "myEmail"
   Objmail.To  = "YourEmail"
   objmail.Cc = "HisEmail"
   Objmail.subject = "thesubject"
   objmail.Body = "the body text"
   objmail.Send
   Set ObjMail = Nothing
    response.write "sent OK"
  end if

I can verify the code, see that all the variables are well set to and that
the object is created but nothing seems to go out to my own test email
account. When I check my inbox, nothing arrived.
Any ideas on what is needed to make this work.
The project has a refernce to CDONTS.dll set and the code completes OK. It
does not get interrupted by an error. When testing in the browser it sees
the line Sent OK, meaning the code got completed without generating an
error.

Any ideas would be gretaly appreciated.



Sun, 12 May 2002 03:00:00 GMT  
 CDONTS.DLL doesn't seem to work.

Since you check for CreateObject success with IsObject, do you have "On Error Resume Next" on all the time?  If so, you may be masking other errors, in particular an error on the Send method...

--
Michael Harris

  The following code in a vb script in an ASP page on my IIS server is
  supposed to send out an e-mail message.

    Set objmail = CreateObject("CDONTS.NewMail")
    If Isobject(objmail) then
     Objmail.From  = "myEmail"
     Objmail.To  = "YourEmail"
     objmail.Cc = "HisEmail"
     Objmail.subject = "thesubject"
     objmail.Body = "the body text"
     objmail.Send
     Set ObjMail = Nothing
      response.write "sent OK"
    end if

  I can verify the code, see that all the variables are well set to and that
  the object is created but nothing seems to go out to my own test email
  account. When I check my inbox, nothing arrived.
  Any ideas on what is needed to make this work.
  The project has a refernce to CDONTS.dll set and the code completes OK. It
  does not get interrupted by an error. When testing in the browser it sees
  the line Sent OK, meaning the code got completed without generating an
  error.

  Any ideas would be gretaly appreciated.



Sun, 12 May 2002 03:00:00 GMT  
 CDONTS.DLL doesn't seem to work.

Thanks for your reply Michael,
No I do not have an error resume next set at all in this script. I should, but for now its removed to test.
All the lines execute without an error. The script does get to execute the response.write "sent OK" line indicating that it did not encounter any errors.
It's just that nothing seems to get sent (I look in my email account at my ISP using Outlook express and received no mail) although when the send command executes there is a small delay indicating that something is happening.

I should say that I'm testing on an NT4 server that is connecting to the internet via another server on an ADSL line (using sympatico high speed) going thru an NT proxy server. I thought that my ISP may be blocking me sending mail using another From address than my own, so I tested it with my own as sender. Still same results. All my other e-mail programs work OK from this workstation and I do have the proxy client here correctly configured for all the other programs. (ie and outlook and outlook express) The SMTP service is working on this machine.

Weird.


  Since you check for CreateObject success with IsObject, do you have "On Error Resume Next" on all the time?  If so, you may be masking other errors, in particular an error on the Send method...

  --
  Michael Harris

    The following code in a vb script in an ASP page on my IIS server is
    supposed to send out an e-mail message.

      Set objmail = CreateObject("CDONTS.NewMail")
      If Isobject(objmail) then
       Objmail.From  = "myEmail"
       Objmail.To  = "YourEmail"
       objmail.Cc = "HisEmail"
       Objmail.subject = "thesubject"
       objmail.Body = "the body text"
       objmail.Send
       Set ObjMail = Nothing
        response.write "sent OK"
      end if

    I can verify the code, see that all the variables are well set to and that
    the object is created but nothing seems to go out to my own test email
    account. When I check my inbox, nothing arrived.
    Any ideas on what is needed to make this work.
    The project has a refernce to CDONTS.dll set and the code completes OK. It
    does not get interrupted by an error. When testing in the browser it sees
    the line Sent OK, meaning the code got completed without generating an
    error.

    Any ideas would be gretaly appreciated.



Sun, 12 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. STMAdmin.dll to query NT Log doesn't seem to work properly

2. define a measurement doesn't seem to work

3. location.replace doesn't seem to work

4. comparisons between decimal and hex values doesn't seem to work

5. response.expires doesn't seem to work!

6. My Script...Doesn't Seem to Work

7. focus() doesn't seem to work in IE-6

8. HitTest doesn't seem to work as expected

9. FormField.EntryMacro doesn't seem to work

10. AddHandler doesn't seem to work

11. AppActivate doesn't seem to work with SendKeys

12. AddHandler doesn't seem to work

 

 
Powered by phpBB® Forum Software