jonramsey Posted September 3, 2010 Posted September 3, 2010 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
Juvigy Posted September 6, 2010 Posted September 6, 2010 Does it have to be CDO or you can use something else? For example there is a nice Outlook UDF.
wakillon Posted September 6, 2010 Posted September 6, 2010 try to add this 2 lines...objEmail.HTMLBody = strHTMLMessageobjEmail.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.0 - WIN 8.1 X64 - Other Example Scripts
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now