Jump to content
Sign in to follow this  

CDO.Message - Message header too large

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") = _


objEmail.Configuration.Fields.Item _

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



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?


Share this post

Link to post
Share on other sites

Does it have to be CDO or you can use something else?

For example there is a nice Outlook UDF.

Share this post

Link to post
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 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.