Jump to content

CDO.Message - Message header too large


 Share

Recommended Posts

I use the following to create and send a CDO.Message:

'create a windows email object to instantiate the email

Set objEmail = CreateObject("CDO.Message")

objEmail.From = "ebills@energyunited.com"

objEmail.To = email_address

objEmail.Bcc = "ebills@energyunited.com"

objEmail.Subject = strSubject

objEmail.HTMLBody= strHTMLMessage

objEmail.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

objEmail.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _

"statesville-ex3.energyunited.com"

objEmail.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

objEmail.Configuration.Fields.Update

objEmail.Send

The email header that is created is over 1200 characters. Some of my recipients see this as spam and won't accept the email. How can I minimize the header?

Thanks

Link to comment
Share on other sites

try to add this 2 lines...

objEmail.HTMLBody = strHTMLMessage

objEmail.Fields ( "urn:schemas:mailheader:disposition-notification-to") = "ebills@energyunited.com"

objEmail.Fields ( "urn:schemas:mailheader:return-receipt-to") = "ebills@energyunited.com"

objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...