pandawatch410 Posted September 13, 2010 Posted September 13, 2010 Good day, I recently upgraded a server of mine with a simple ASP site to server 2008 and it sent emails from exchange 2003 with no problems after the upgrade to server 2008. Here is the code: 1.private void SendTextMessageCC(string fromAddress, string fromName, 2. string toAddress, string subject, string body, string ccAddress) 3. { 4. try 5. { 6. MailAddress fromAdd = new MailAddress(fromAddress, fromName); 7. MailAddress toAdd = new MailAddress(toAddress); 8. MailAddress ccAdd = new MailAddress(ccAddress); 9. MailMessage msg = new MailMessage(fromAdd, toAdd); 10. msg.Subject = subject; 11. msg.Body = body; 12. msg.CC.Add(ccAdd); 13. SmtpClient client = new SmtpClient("deexch1.****.com"); // localhost 14. client.Send(msg); 15. 16. // msg.DeliveryNotificationOptions = 0; 17. // 2 means OnFailure was 1 but that was error 0 okay means "None" 18. } 19. catch (SmtpException s) 20. { 21. lblSuccess.Text = s.Message; 22. 23. } 24. 25. } Now this week I upgraded my Exchange Server to 2010 (Server 2008) and changed the smtpclient string accordingly above to SmtpClient("draw-mail1.****.com"). It will not send emails from the server, but when I run it from local host it sends them without a problem. When I send from an XP Machine it sends fine to the new mail server. It is something with IIS and Server 2008. Any Help? I am stumped. Quote
Forum² Admin F2 Staff Posted September 13, 2010 Forum² Admin Posted September 13, 2010 Make sure you set the server to run scripts in 32bit mode. That should fix the problem. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.