How to send email

I’m trying to send an email with a html body but everytime that i set the contenttype of the boty to text/html the email came empty, what it could be?.
The services that i used are, createMimeData → addMimeHeader → stringToStream (with the html) → addBoydPart (with the contenttype set to text/html and encondig set to quoted-printable) → getEnvelopedStream → Stmp.

I attached and image. Thank you.

I have another way of doing with smtp service for handling as HTML body.

Use the service
pub.report:runStringTemplate (set $template) with similar code as below

Status Report

Total Errors Count: %value totalErrorDocCount%
%loop report_results% %endloop%
webMethodsDocumentID
%value DocID%

And convert the output $txt string to bytes and in the smtp service map the bytes to

attachments[0]/content and
attachments[0]/contenttype (text/html)

This setup should get the HTML body in the email…please test it in DEV.

HTH,
RMG

I have test it, but it still having the email body empty, i think that gmail does’t support mime attachment or cid image in html. Have you ever try this?. Thank you.

Did you try with above mentioned steps with out MIME steps?..My solution is with out having MIME streams etc…so create a brand new test flow and test it.

Can you try email to outlook id and see how it works?

Either way my provided solution should work for any email servers.

HTH,
RMG

Ok, i will try in outlook, in gmail does’t work, but if i change text/html by text/plain the email body appear the html code perfectly, its very strange. i think it’s the gmail security rules. Thanks you.

May be…as long it works for you!