Click here to Skip to main content
15,890,882 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionString Builder class Pin
bhavna432128-Dec-08 21:13
bhavna432128-Dec-08 21:13 
AnswerRe: String Builder class Pin
N a v a n e e t h28-Dec-08 22:18
N a v a n e e t h28-Dec-08 22:18 
AnswerRe: String Builder class Pin
Brij28-Dec-08 22:21
mentorBrij28-Dec-08 22:21 
GeneralRe: String Builder class Pin
N a v a n e e t h28-Dec-08 22:27
N a v a n e e t h28-Dec-08 22:27 
GeneralRe: String Builder class Pin
Brij29-Dec-08 0:00
mentorBrij29-Dec-08 0:00 
Question'System.Web.UI.Util' is inaccessible due to its protection level Error [modified] Pin
Rameez Raja28-Dec-08 21:09
Rameez Raja28-Dec-08 21:09 
AnswerRe: 'System.Web.UI.Util' is inaccessible due to its protection level Error Pin
Tom Delany29-Dec-08 10:24
Tom Delany29-Dec-08 10:24 
QuestionNot Catch the SmtpFailedRecipientsException Pin
nithydurai28-Dec-08 20:26
nithydurai28-Dec-08 20:26 
MailAddress from = new MailAddress("nithya.d@demo.com");
MailAddress to = new MailAddress("nithydurai@gmai.com");
MailMessage message = new MailMessage(from, to);
message.Subject = "hai dear";
message.Body = "Hello this is a test Mail";
message.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure | DeliveryNotificationOptions.Delay;
SmtpClient client = new SmtpClient("75.126.193.146");
// Include credentials if the server requires them.
client.Credentials = new NetworkCredential("info@afxisi.net", "afxisi");

message.Headers.Add("Disposition-Notification-To", "nithya.d@afxisi.co.in");
//client.SendCompleted += new
// SendCompletedEventHandler((this.SendCompleted));
Boolean bTemp = true;
try
{

client.Send(message);


}
catch (SmtpFailedRecipientsException ex)
{
for (int i = 0; i < ex.InnerExceptions.Length; i++)
{
SmtpStatusCode status = ex.InnerExceptions[i].StatusCode;
if (status == SmtpStatusCode.MailboxBusy ||
status == SmtpStatusCode.MailboxUnavailable)
{

Console.WriteLine("Delivery failed - retrying in 5 seconds.");
System.Threading.Thread.Sleep(5000);
client.Send(message);
}
else
{
Console.WriteLine("Failed to deliver message to {0}",
ex.InnerExceptions[i].FailedRecipient);
}
}
}

catch (SmtpException ex)
{
Response.Write(ex.ToString());
}
catch (ObjectDisposedException ex)
{
Response.Write(ex.ToString());
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}

}

}



i send the wrong mail id... but this program not catch the SmtpFailedRecipientsException.... pls help me
AnswerRe: Not Catch the SmtpFailedRecipientsException Pin
N a v a n e e t h28-Dec-08 20:48
N a v a n e e t h28-Dec-08 20:48 
GeneralRe: Not Catch the SmtpFailedRecipientsException Pin
nithydurai28-Dec-08 21:11
nithydurai28-Dec-08 21:11 
GeneralRe: Not Catch the SmtpFailedRecipientsException Pin
N a v a n e e t h28-Dec-08 22:12
N a v a n e e t h28-Dec-08 22:12 
GeneralRe: Not Catch the SmtpFailedRecipientsException Pin
nithydurai28-Dec-08 22:27
nithydurai28-Dec-08 22:27 
GeneralRe: Not Catch the SmtpFailedRecipientsException Pin
N a v a n e e t h28-Dec-08 22:38
N a v a n e e t h28-Dec-08 22:38 
AnswerRe: Not Catch the SmtpFailedRecipientsException Pin
Jas 00728-Dec-08 21:32
Jas 00728-Dec-08 21:32 
GeneralRe: Not Catch the SmtpFailedRecipientsException Pin
nithydurai28-Dec-08 21:40
nithydurai28-Dec-08 21:40 
GeneralNot Catch the SmtpFailedRecipientsException Pin
Jas 00729-Dec-08 19:30
Jas 00729-Dec-08 19:30 
Questionhelp me Pin
janani1328-Dec-08 20:06
janani1328-Dec-08 20:06 
AnswerRe: help me Pin
Abhijit Jana28-Dec-08 20:21
professionalAbhijit Jana28-Dec-08 20:21 
AnswerRe: help me Pin
Brij28-Dec-08 20:45
mentorBrij28-Dec-08 20:45 
AnswerRe: help me Pin
N a v a n e e t h28-Dec-08 20:50
N a v a n e e t h28-Dec-08 20:50 
GeneralRe: help me Pin
Abhijit Jana28-Dec-08 22:13
professionalAbhijit Jana28-Dec-08 22:13 
GeneralRe: help me Pin
_AK_28-Dec-08 23:23
_AK_28-Dec-08 23:23 
GeneralRe: help me Pin
Brij29-Dec-08 3:11
mentorBrij29-Dec-08 3:11 
QuestionOutput Cache, cookie save and page expiry Pin
misha_grewal28-Dec-08 20:00
misha_grewal28-Dec-08 20:00 
AnswerRe: Output Cache, cookie save and page expiry Pin
Brij28-Dec-08 21:04
mentorBrij28-Dec-08 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.