Encoding problem in sending email via Outlook Microsoft.Office.Interop

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello
I use that code to send email via Microsoft.Office.Interop :
<pre class="prettyprint lang-vb Dim oApp As New Outlook.Application()
Dim email As Outlook.MailItem = DirectCast(oApp.CreateItem(Outlook.OlItemType.olMailItem), Outlook.MailItem)
email.Recipients.Add(row.ToString)
email.Subject = "subjecttext"
email.Body = "bodytext"

DirectCast(email,Outlook.MailItem).Send()[/code]
and it always worked.
Recently the recipient receive the mail under this strange format:
<pre class="prettyprint R=E9c?=
=?iso-8859-1?Q?up=E9ration_du_cahier_de_charge_de_lOMMP.
R=E9cup=E9rati?=
=?iso-8859-1?Q?on_du_cahier_de_charge_de_minist=E8re_de_la_culture.?=
Date: Tue, 12 Jun 2012 08:55:05 +0100
Message-ID: <000d01cd4870$b6bb7d10$24327730$@vnext-consulting.net>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000E_01CD4879.1886E9F0"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Ac1IcK1c0W2LBw/PQdaU10iieo6gAg==
Content-Language: fr

This is a multipart message in MIME format.

------=_NextPart_000_000E_01CD4879.1886E9F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable[/code]
<br/>
Is an encoding problem ? I must test the encoded text in my code?
Thanks in advance
Regards


<hr class="sig Best Regards...Please mark as answer if my post is helpful http://yosr-jemili.blogspot.com

View the full article
 
Back
Top