1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Email Failed with reason like mailbox full.

Discussion in 'ASP' started by nasim.sona, Dec 8, 2009.

  1. nasim.sona

    nasim.sona New Member

    Joined:
    Dec 8, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi Experts.

    I need to handle a situation programatically for the mail failed becouse of mail box full or other such situation , I am using asp.net like

    try{
    System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient();
    MailMessage mail = newMailMessage();
    mail.Body = Body;
    mail.IsBodyHtml = true;
    smtp.Host = serveur;
    smtp.Port = Port;
    smtp.EnableSsl = false;
    smtp.Send(mail);
    }catch(Exception ee)

    Please suggest!
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,287
    Likes Received:
    364
    Trophy Points:
    83
    You cannot handle that and your server needs to unless you are planning to create SMTP server program
     
  3. nasim.sona

    nasim.sona New Member

    Joined:
    Dec 8, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Yes, Shabbir I know I need to access SMTP server ,I would like to know if there is some api or log that is accessible and I can use those in my application.
    Say when next time application runs it should be able to find the details of failed delivery.
    Can any one suggest some such log or api ?Please!
     
  4. urstop

    urstop New Member

    Joined:
    Oct 17, 2007
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    0
    Mostly, when such failure occurs, the From Email address receives a mail from the smtp server with the message. So you will have to monitor the From Email address mail box to find out if such scenario happens.
     
  5. nasim.sona

    nasim.sona New Member

    Joined:
    Dec 8, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for the suggestion! but actually I am using port directly , can you give some more detail what should be the way to find the detail from 'from mail box'.
     
  6. urstop

    urstop New Member

    Joined:
    Oct 17, 2007
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    0
    Check this link http://www.codeproject.com/KB/IP/despop3client.aspx , it has the necessary example code which tells you how you can connect to a pop3 mail box and read its contents. You can use this logic to loop thru each mail items to check if there is a mail item which is realted to the "mail box full" message.
     

Share This Page