Sign in to follow this  
Followers 0
jonramsey

CDO.Message - Message header too large

3 posts in this topic

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

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 3.3.14.2 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  
Followers 0