Mail is received in Plain text even formatted and sent in HTML

Status
Not open for further replies.
D

DPM

Hi,

MS Outlook is automated to send out an email in HTML but when the email is

received from MS Outlook it is in plain text.

The email in Sent items is in HTML format.

If an email is created from MS Outlook itself(not programmetically) in HTML

and sent, when received it is in HTML format.

Following is the configuration of this computer

- Windows 2003 enterprise edition x64

- MS Outlook 2007 with excahnge server

- Logged on to the server using a Cirtix session

- Default email application of Windows is set to MS Outlook

In a Windows 2003 standard edition x64, with MS Outlook 2007 the mail is

sent and received in HTML without a problem.(without MS Excahnge Server and

Citrix)

Following is the code we use to generate and send the mail.

loOutLookSession = CREATEOBJECT('OutLook.Application')

loOutBox = loOutLookSession.GetNameSpace("MAPI").GetDefaultFolder(4)

loMailItem = loOutBox.Items.Add(0)

loMailItem.Subject = "Subject"

loMailItem.BodyFormat = 2

loMailItem.Body = <HTML text
loMailItem.HTMLBody = <HTML text
loMailItem.To = aa@bb.cc

loMailItem.Send()

Please could someone advice, what could be the cause?
 
What happens if you don't write into Body but into HTMLBody only?

Best regards

Michael Bauer

Am Fri, 21 May 2010 10:32:59 +0530 schrieb DPM:


> Hi,

> MS Outlook is automated to send out an email in HTML but when the email is
> received from MS Outlook it is in plain text.
> The email in Sent items is in HTML format.
> If an email is created from MS Outlook itself(not programmetically) in


HTML
> and sent, when received it is in HTML format.

> Following is the configuration of this computer
> - Windows 2003 enterprise edition x64
> - MS Outlook 2007 with excahnge server
> - Logged on to the server using a Cirtix session
> - Default email application of Windows is set to MS Outlook

> In a Windows 2003 standard edition x64, with MS Outlook 2007 the mail is
> sent and received in HTML without a problem.(without MS Excahnge Server


and
> Citrix)

> Following is the code we use to generate and send the mail.

> loOutLookSession = CREATEOBJECT('OutLook.Application')
> loOutBox = loOutLookSession.GetNameSpace("MAPI").GetDefaultFolder(4)

> loMailItem = loOutBox.Items.Add(0)
> loMailItem.Subject = "Subject"
> loMailItem.BodyFormat = 2
> loMailItem.Body = <HTML text
> loMailItem.HTMLBody = <HTML text
> loMailItem.To = aa@bb.cc
> loMailItem.Send()

> Please could someone advice, what could be the cause?
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
L Help: set flag for sent mail to check if received an answer Outlook VBA and Custom Forms 2
N Please advise code received new mail Using Outlook 0
S Outlook Macro to send auto acknowledge mail only to new mails received to a specific shared inbox Outlook VBA and Custom Forms 0
S Received mail as part of DL, need to auto-CC the same when replying Outlook VBA and Custom Forms 5
D Help with code to move mail on receipt to another folder based on time received Outlook VBA and Custom Forms 2
D Outlook 2007 e-mail header- How to set font & font size in received message headers ? Using Outlook 2
M Outlook mail to agile from specific folders as the mail is received Using Outlook 3
E Saving Changes To Edited E-Mail Received Message Using Outlook 0
Z Trigger macro to run after a new mail is received in Outlook? Using Outlook 3
S OL 2010 shortcut to edit received mail Using Outlook 3
K E-mail account disabled. Now I can't see the e-mails i've received for 2 weeks Using Outlook 1
G Rule: IF mail received by X, THEN no action; IF mail not received by X, SEND Using Outlook 0
R How to add button to received e-mail message? Outlook VBA and Custom Forms 2
L Error when exporting Sent Mail to Excel Outlook VBA and Custom Forms 6
X Run macro automatically when a mail appears in the sent folder Using Outlook 5
K How can I delete an e-mail from Outlook Using Outlook 1
A Macro Mail Alert Using Outlook 4
e_a_g_l_e_p_i MY Outlook 2021 changed the format of the shortcuts for mail, calendar etc. Using Outlook 10
Z Outlook 365 Automatically assign categories to incoming mail in a shared folder Round Robin Outlook VBA and Custom Forms 1
W Outlook 365 I am getting the "Either there is no default mail client" error when I try to send an email on excel Office 365 Using Outlook 1
D Gmail mail is being delivered to a different email inbox in Outlook App 2021 Using Outlook 2
P What is your strategy for dealing with SPAM and Junk Mail? Using Outlook 1
C Code to move mail with certain attachment name? Does Not work Outlook VBA and Custom Forms 3
T 1:1 Datatransfer from incoming mail body to customs form body Outlook VBA and Custom Forms 0
O Mail rule issue Using Outlook 3
A manual rule sends mail to wrong folder Using Outlook 5
Aussie Outlook 365 Rule runs manually but returns the error code "an unexpected error has occurred" when incoming mail arrives Using Outlook 1
D ISOmacro to extract active mail senders name and email, CC, Subject line, and filename of attachments and import them into premade excel spread sheet Outlook VBA and Custom Forms 2
Witzker Outlook 2019 Macro to answer a mail with attachments Outlook VBA and Custom Forms 2
D Outlook 2003 Mail Fails Using Outlook 1
Cathy Rhone Mail merge error message Using Outlook 1
R Sent emails show iCloud mail account not the alias Using Outlook 2
D Advanced e-Mail search on from/to contact group only searches for first 20 contacts in group Using Outlook 0
P Print attachments automatically and move the mail to an existing folder called "Ted" Outlook VBA and Custom Forms 4
P Importing other e-mail accounts into Outlook Using Outlook 1
lcarpay Stay in the mail folder pane after ctrl-1 Using Outlook 1
O Exchange Sync period only (e.g. last years mail) Using Outlook 0
F Excel VBA to move mails for outlook 365 on secondary mail account Outlook VBA and Custom Forms 1
M Convertor for Outlook Express Mail Store (.dbx) to Outlook Mail Store (.pst) Using Outlook 0
T vba extract data from msg file as attachment file of mail message Outlook VBA and Custom Forms 1
J E-mail held in Outbox while Minimized Using Outlook 3
G Forward email body to other mail list directly from Exchange server Exchange Server Administration 1
T Outlook creates a copie of every mail I send Using Outlook.com accounts in Outlook 4
M Outlook 2010 How could I globally redesign an outlook template form/region/inspector template used to display mail lists or an individual mails? Outlook VBA and Custom Forms 0
A How to stop user form from disapearing once mail window is closed? Outlook VBA and Custom Forms 0
M Outlook, send to > mail recipient - results in plain text email Using Outlook 1
R How to Sync *all* Google Workspace Mail Folders with Outlook 2019 (MS365) Using Outlook 3
S Outlook VBA How to adapt this code for using in a different Mail Inbox Outlook VBA and Custom Forms 0
E Having some trouble with a run-a-script rule (moving mail based on file type) Outlook VBA and Custom Forms 5
S Outlook email to configure setup for each mail Outlook VBA and Custom Forms 1

Similar threads

Back
Top