smtp .Net mailer class
I ended up having do some SMTP authentication. In order to do this I had to create a custom Credential Cache object to tie to my SMTPClient object for the email request..
//SMTP CREDENTIAL INFORMATION
//set username and pass for smtp authentications
NetworkCredential netLogin = new NetworkCredential(eMail.SMTPLoginName, eMail.SMTPLoginPassword);
//set authenticated smtp connection network configuration credentials
CredentialCache myCache = new CredentialCache();
myCache.Add(eMail.SMTPServerName, Convert.ToInt16(eMail.SMTPPort), "", netLogin);
//assign custom credentials to this authenticated smtp request
client.Credentials = myCache;
No comments:
Post a Comment