I know this question has been asked several times, however, after digging through question for past hour an half and not finding any resolution i'm at a bit of a dead end. Also most of these questions refer to Window Server 2000 / Exchange 2003 / IIS 6.0
this is the code:
var mail = new MailMessage();
mail.From = new MailAddress("Administrator@$#@!.com");
mail.To.Add(to);
mail.Subject = subject;
var plainView = AlternateView.CreateAlternateViewFromString(body, null, "text/plain");
var htmlView = AlternateView.CreateAlternateViewFromString(body + "<img style=\"text-align: center;\" src=cid:companylogo><br/>", null, "text/html");
ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };
var path = Server.MapPath(@"logo.jpg");
var logo = new LinkedResource(path) {ContentId = "companylogo"};
htmlView.LinkedResources.Add(logo);
mail.AlternateViews.Add(plainView);
mail.AlternateViews.Add(htmlView);
var smtpClient = new SmtpClient();
smtpClient.EnableSsl = true;
System.Net.NetworkCredential("Administrator@$#@!.com", "!@#$%^");
smtpClient.Send(mail);
I have tried authenticating in the web.config as well
<smtp>
<network host="192.000.0.001"
userName="administrator@%^##.com"
password="!@#$%^" port="25" />
</smtp>
SBS 2008 Exchange 2007 IIS 7 SP2
I have tried different settings in the IIS SMTP Email settings and Exchange Send Connector.
I noticed some other posts had mentioned changing SMTP Virtual settings using IIS 6 manager however I am unable to view these settings in IIS 6. ex. Related Question
I know this is not a question that can be directly answered, however, any input in how I can go about effectively troubleshooting this issue.