Results 1 to 4 of 4

Thread: Exchange Server email gets stuck in drafts folder not being sent

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2012
    Posts
    4

    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.

    Try
    Dim service As ExchangeService
    Dim service As New ExchangeService(ExchangeVersion.Exchange2007_SP1)

    service.Credentials = New WebCredentials(System.Configuration.ConfigurationManager.AppSettings("Username"), _
    System.Configuration.ConfigurationManager.AppSettings("Password"))
    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")
    message.ToRecipients.Add(name, email)
    message.SendAndSaveCopy()

    Catch ex As Exception
    Return False
    End Try
    Return True

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Exchange Server email gets stuck in drafts folder not being sent

    Try just sending the email... not sendandsavecopy. The save copy is what is putting it into the drafts folder.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2012
    Posts
    4

    Re: Exchange Server email gets stuck in drafts folder not being sent

    Same thing happens they get stuck in drafts folder. Had already tried that and i m checking destination mailbox while testing.

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2012
    Posts
    4

    Re: Exchange Server email gets stuck in drafts folder not being sent

    Ended up being the name and email parameters being in the wrong order, as usual silly mistake on my part.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width