1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

send mail using CDONTS

Discussion in 'C#' started by inderpal, Aug 9, 2006.

  1. #1
    Hi All,
    SEMrush
    I am writing an ASP page for sending mails using CDONTS component. Is there any way to capture errors if the components fails to send mails?

    I would appreciate any helps in this regard. Thanks in advance!

    Best Regards,
    Inderpal Singh
     
    inderpal, Aug 9, 2006 IP
    SEMrush
  2. Free Born John

    Free Born John Guest

    Messages:
    111
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    hi Inderpal,

    CDONTS is fairly obsolete nowadays, and most sites have switched to CDO or the system.mail facility in the .Net libraries. Either of these will probably be a better bet. It should be easy to trap if a mail is not sent, but rather harder to trap if it doesn't arrive.

    regards

    FBJ
     
    Free Born John, Aug 9, 2006 IP
  3. inderpal

    inderpal Active Member

    Messages:
    919
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    68
    #3
    Hi,

    Thanks for replying and yeah, I know CDONTS is obsolete but my client wants in that component only. Could you provide me some way to track if there is any error while sending mails like CDONTS is component is not installed and other errors?

    Best Regards,
    Inderpal Singh
     
    inderpal, Aug 9, 2006 IP
  4. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    sure you can. just capture the error and response.write it to the browser, i.e.
    
    strErr = ""
    	On Error Resume Next ' catch errors
    		If Err <> 0 Then ' error occurred
    			strErr = Err.Description
    			response.write "Error: "&strErr&"<br/>"&vbcrlf
    		End If
    
    Code (markup):

    keep asking questions and i might just break 500 posts today! lol let's have a party! :p

    VG
     
    vectorgraphx, Aug 9, 2006 IP
  5. inderpal

    inderpal Active Member

    Messages:
    919
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    68
    #5
    Thanks VG and CONGRATS. you have completed your 500 posts :)

    Best Regards,
    Inderpal Singh
     
    inderpal, Aug 9, 2006 IP
  6. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,607
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #6
    yes, use CDONTs is on its way out to stay away from it when possible
     
    ccoonen, Aug 12, 2006 IP