Hello
OE 11.3 - AIX 7.1
We need to send emails to the clients from our application, with graphic, tables, formatted text... in message body itself (not as an attachment). What will be the easiest way to do this on 'plain' AIX - with just 'plain' 4GL.
We can create the 'MHT' file (MHTML format). Can this file be embedded directly into email body and emailed using smtpmail.p? If yes which parameters need to be specified and how (we are using smtpmail.p to email PDF/ZIP attachments)? Or this will now be correct way to approach this?
Thanks
Jan
The best way would be format your email body in MIME format.
Normally you should be using multipart/alternative - one for plain text and one for HTML. If you don't specify a plain text alternative your email might be flagged as spam.
For example (stolen from http://www.enewsletterpro.com/articles/multi_part_mime_messages.asp):
X-sender: <sender@sendersdomain.com>
X-receiver: <somerecipient@recipientdomain.com>
From: "Senders Name" <sender@sendersdomain.com>
To: "Recipient Name" <somerecipient@recipientdomain.com>
Message-ID: <5bec11c119194c14999e592feb46e3cf@sendersdomain.com>
Date: Sat, 24 Sep 2005 15:06:49 -0400
Subject: Sample Multi-Part
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_DC7E1BB5_1105_4DB3_BAE3_2A6208EB099D"
------=_NextPart_DC7E1BB5_1105_4DB3_BAE3_2A6208EB099D
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Sample Text Content
------=_NextPart_DC7E1BB5_1105_4DB3_BAE3_2A6208EB099D
Content-type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<html>
<head>
</head>
<body>
<div style=3D'FONT-SIZE: 10pt; FONT-FAMILY: Arial'>Sample HTML =
Content</div>
</body>
</html>
------=_NextPart_DC7E1BB5_1105_4DB3_BAE3_2A6208EB099D--
If your MHT file contains all the boundaries you can use that as-is in your email body.
The best way would be format your email body in MIME format.
Normally you should be using multipart/alternative - one for plain text and one for HTML. If you don't specify a plain text alternative your email might be flagged as spam.
For example (stolen from http://www.enewsletterpro.com/articles/multi_part_mime_messages.asp):
X-sender: <sender@sendersdomain.com>
X-receiver: <somerecipient@recipientdomain.com>
From: "Senders Name" <sender@sendersdomain.com>
To: "Recipient Name" <somerecipient@recipientdomain.com>
Message-ID: <5bec11c119194c14999e592feb46e3cf@sendersdomain.com>
Date: Sat, 24 Sep 2005 15:06:49 -0400
Subject: Sample Multi-Part
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_DC7E1BB5_1105_4DB3_BAE3_2A6208EB099D"
------=_NextPart_DC7E1BB5_1105_4DB3_BAE3_2A6208EB099D
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Sample Text Content
------=_NextPart_DC7E1BB5_1105_4DB3_BAE3_2A6208EB099D
Content-type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<html>
<head>
</head>
<body>
<div style=3D'FONT-SIZE: 10pt; FONT-FAMILY: Arial'>Sample HTML =
Content</div>
</body>
</html>
------=_NextPart_DC7E1BB5_1105_4DB3_BAE3_2A6208EB099D--
If your MHT file contains all the boundaries you can use that as-is in your email body.
Thanks for your reply. We will check it out.
Might want to try this amduus.com/.../amduusclasses.2010147213924.zip