Why can't I send e-mail from ASP (.Net) anymore?
Things that used to work mighty fine in 2000 server suddenly break in 2003.
- CDONTS is no longer available, but it works if you copy one dll from a 2000 system and do a regsvr32 %windir%\system32\cdonts.dll
- Classic ASP using CDO fails with error “cdo.message error 80070005”. Reason: the user IIS runs under (usually Network Service) must have write acces to the Exchange pickup directory (usually C:\Program Files\Exchsrvr\Mailroot\vsi 1\PickUp)
- ASP.Net scripts also fail with several possible messages, “acces denied” or “cannot access cdo.message object”. Solution: always specify a valid SMTP server address, e.g. in web.config, then ` System.Web.Mail.SmtpMail.SmtpServer = System.Configuration.ConfigurationSettings.AppSettings[“SmtpServer”]; System.Web.Mail.SmtpMail.Send(msg);`