cancel
Showing results for 
Search instead for 
Did you mean: 

Create an e-mail template that supports multipart text/plain and text/html

a_gordon
Explorer
0 Kudos
517

Platform: SAP Business ByDesign

If I use the default e-mail text, in this example a customer invoice, the e-mail is sent using Content-Type: text/plain

Content-Type: multipart/mixed; boundary="=_MIX00163ED4C8BC1EECA9A8CBED45C75024"

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

Dear Sir or Madam,

Please find our invoice attached.

If you have any questions, please do not hesitate to contact us.

Yours sincerely,

--=_MIX00163ED4C8BC1EECA9A8CBED45C75024
Content-Type: application/pdf; name="Customer-Invoice_IV-12345_20220323-160716UTC.PDF"
Content-Transfer-Encoding: base64

--=_MIX00163ED4C8BC1EECA9A8CBED45C75024--<br>

if I upload an e-mail template using the "Form Template Maintenance > Actions > Create E-Mail Template" option, the template works, but when I inspect the raw e-mail that is sent, it only sends a Content-Type: text/html. It doesn't include a text/plain version.

Content-Type: multipart/mixed; boundary="=_MIX00163ED4C8BC1EECAAD869E3B52307D1"

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

<html>
<body>
<p>Hello</p>

<p>Please find our invoice attached.</p>

<p>If you have any questions, please do not hesitate to contact us.</p>

<p>Yours sincerely,<br>
[CustomerInvoice-EmployeeResponsibleParty-FormattedName]
</p>
</body>
</html>
--=_MIX00163ED4C8BC1EECAAD869E3B52307D1
Content-Type: application/pdf; name="Customer-Invoice_IV-12345_20220323-160716UTC.PDF"
Content-Transfer-Encoding: base64


--=_MIX00163ED4C8BC1EECAAD869E3B52307D1--<br>

Is there a way to ensure that the e-mail is sent using both text/html and text/plain? I am slightly concerned about the quality of e-mail going out if it only includes text/html. Can I upload a file that includes the text/plain version? I tried to upload an html file without any mark-up but the validation failed so I assume that is not possible.

Alternatively is there somewhere to edit the default plain-text message? In business configuration perhaps? The plain-text version is pretty close to what we would use anyway.

Accepted Solutions (0)

Answers (1)

Answers (1)

kedarpawgi
Explorer
0 Kudos

Hi Alax

First thing i dont know which language or platform your using for sending mail. But yday i faced same issue , but i am using PHP and Codeigniter for sending mail, and i changed few think and it worked

if feel what you do is....

' text / html ' change to ' html ' if your using anywhere in $config['mailtype']='html'

try 'charset utf-8' to $config['charset'] = 'iso-8859-1'

Hope it will work , if you just wanna send text msg which u provided. I am still facing issue for not getting border or other CSS working for the table, as i am sending some registration details.

so kind request , these are my suggestion, cant say it will work for your case.

Hope it works.

i am sorry if it didnt worked for you, as i am not aware what platform your using.

Best luck.