scalino
  • scalino
  • 50.75% (Neutral)
  • Newbie Topic Starter
6 years ago
Hello,

using the ActiveX trial version for Delphi. We want to make sure everything's ok before ordering commercial one, but we got the following issue :

- setting my body
- BodyFormat set to 1
- Content-Type set to multipart/alternative

the mail is received properly on most mail clients. However Gmail displays it with no body and a "noname" attached file that contains both the text/plain and text/html html-coded versions of my body.

If I log the raw_content variable value before sending the mail, I get:


Content-Type: multipart/alternative
Sender:
Message-ID:
From: "=?utf-8?B?U2VjcsOpdGFpcmVzIE1lZGlmaWw=?="
To:
Subject: =?utf-8?B?TUVTU0FHRSBURVNUIEJZIFBBU01BSUwgSVRTRUxGIC0gU01U?=
=?utf-8?B?UCBTU0wvVExT?=
Date: Fri, 7 Dec 2018 17:14:55 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="d8309d0e7a50e40dbe2d3a91001cf03a"

--d8309d0e7a50e40dbe2d3a91001cf03a
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable

This my body text here...

--d8309d0e7a50e40dbe2d3a91001cf03a
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable

This my body text here...

--d8309d0e7a50e40dbe2d3a91001cf03a--
-


If I save the mail in .eml format and open it with Thunderbird: no body at all, no attached file...
no error whatsoever in the EASendMail's logfile.

Could it be due to the ending of raw_content, where the boundary chain is inserted but nothing lies behind? If yes, how to fix this?

Shouldn't the text/html section of my body's content inside the raw_content variable show HTML tags like ,...?

ivan
  • ivan
  • 100% (Exalted)
  • Administration
6 years ago
Hi, please do not set Content-Type manually.

You just need to set

BodyFormat = 1
BodyText = "your html body"
AltBody = "your plain text body" ' if you don't set it, easendmail can generate plain text from html body automatically.

https://www.emailarchitect.net/easendmail/sdk/?ct=altbody 


If you set Content-Type manually, you can see your multiple/alternative overrided the multipart/alternative header with boundary.

Content-Type: multipart/alternative
....
Content-Type: multipart/alternative;
boundary="d8309d0e7a50e40dbe2d3a91001cf03a"ou can see there is a header

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.