'Sending email fails with microsoft.office.interop
I posted my question in another forum and they told me that's a technical problem .
I have problem when sending email via a vb.net application .sometimes the mail is sent perfectly and in some cases its sent like encoded text :
I use that code to send :
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()
and the mail is sent like that
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0010_01CEF013.5B447120"
X-Mailer: Microsoft Outlook 15.0
Thread-Index: Ac7wCvGXqJZh0WA1RT29BR1tIH9fLA==
Content-Language: fr
This is a multipart message in MIME format.
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
And if i want to send an attachment in my xp machine with outlook 2007 it works but in a window machine with outlook 2010 it doesnt work.
Hope my explanation is clear
Solution 1:[1]
I had a similar issue today and it drove me crazy. The issue for me was a new line character (ascii 10) in the subject of the email. Apparently multi-line subjects are not dealt with properly. I found the suggestion here
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Super Symmetry |
