Exchange Server email gets stuck in drafts folder not being sent
I'm trying to use an Exchange Server to send emails from asp.net web application and atm the mail is getting stuck in the drafts folder and not being sent.
Emails are being sent fine if i send them using browser or outlook directly. Also if i go to the drafts folder and manually send the vb.net created emails they re being sent and received fine aswell, but that isn't a long term option. If anyone has any idea what is the problem i'ld appreciate the input.
Here is the relevant part of the code i m using.
Dim service As ExchangeService
Dim service As New ExchangeService(ExchangeVersion.Exchange2007_SP1)
service.Credentials = New WebCredentials(System.Configuration.ConfigurationManager.AppSettings("Username"), _
service.Url = New Uri(System.Configuration.ConfigurationManager.AppSettings("ExchangeServer"))
Dim message As New EmailMessage(service)
message.Subject = New String("Test")
message.Body = New String("Just testing")
Catch ex As Exception
Last edited by Paszt; 05-11-2012 at 4:35 PM.
Reason: added [xcode] blocks for readability