Advertisement
Advertisement
| 05.01.2008 at 02:21PM PDT, ID: 23370165 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: |
SmtpClient objEmail = new SmtpClient("mail.domain.local");
objEmail.Credentials = new NetworkCredential("sender@smtp.relay", "*******");
m.Bcc.Add("recipient@something.com");
objEmail.DeliveryMethod = SmtpDeliveryMethod.Network;
objEmail.Send(m);
return true;
}
catch (SmtpFailedRecipientsException e)
{
SmtpStatusCode sc = e.StatusCode;
Error += "||On Send To " + m.To.ToString().Trim() + " - Error Message: " + e.Message.ToString().Trim() + " - StatusCode: " + sc.ToString();
return false;
}
catch (SmtpFailedRecipientException e)
{
SmtpStatusCode sc = e.StatusCode;
Error += "||On Send To " + m.To.ToString().Trim() + " - Error Message: " + e.Message.ToString().Trim() + " - StatusCode: " + sc.ToString();
return false;
}
catch (SmtpException e)
{
SmtpStatusCode sc = e.StatusCode;
Error += "||On Send To " + m.To.ToString().Trim() + " - Error Message: " + e.Message.ToString().Trim() + " - StatusCode: " + sc.ToString();
return false;
}
catch (Exception e)
{
Error += "||On Send To " + m.To.ToString().Trim() + " - Error Message: " + e.Message.ToString().Trim();
return false;
}
|