Sending email in HTML format directly from filePro
Brian K. White
brian at aljex.com
Sun Dec 4 11:01:51 PST 2011
On 12/4/2011 1:05 PM, Jay Ashworth wrote:
> ----- Original Message -----
>> From: "Bill Campbell"<bill at celestial.com>
>
>> On Sat, Dec 03, 2011, Larry Hoover wrote:
>>> I'm creating emails directly from filePro and sending them out via mutt
>>> in Linux. I am successful with plain text emails, but html format does
>>> not render in html. Has anyone done this? Can it be done? Is it a
>>> function of the mutt or sendmail?
>>
>> This sounds like you're not getting the proper mail headers and
>> MIME parts right.
>
> I don't believe that mutt knows *how* to original HTML emails.
>
> Larry needs to understand, if he doesn't already, that HTML email *must*
> be MIME multipart/alternative with a text/plain and a text/HTML part, and
> *should* have some useful content in the text/plain part to avoid pissing
> off recipients who cannot (or like me, choose not to) read HTML email.
>
> (There are good security reasons not to read HTML email...)
>
> Cheers,
> -- jra
You can send a pure html email without any multipart mime just by
putting content-type: text/html in the regular mail headers.
I don't know how to make mutt do it because I generate my emails
directly, including headers and feed them into sendmail, no mutt or
other mua.
mutt is just a convenience to get attachements encoded into base64 and
generate a few lines of mime headers. You can do it yourself almost as
easily and get a lot more flexability, not to mention replacing an
external black box, mutt, with some filepro and/or shell code of your
own that will never change how it works except when you want it to, will
never not-work etc.
Generate a text file test.eml that looks like this, not including the
"--------":
--------
To: larry at hoovercs.com
From: larry at hoovercs.com
Subject: test message
Content-Type: text/html
<html><body>
This is a <b>bold</b> new test.
</body></html>
--------
Now feed this file into "sentmail -ti" (it usually doesn't matter what
MTA you really have, smail, qmail, postfix, mmdf, or actual sendmail,
they all have a program or symlink called "sendmail" and all takes the
most common sendmail arguments.
sendmail -ti < test.eml
That's it.
Just cut&paste the thing above and try it right in a shell session.
The sweet trick for filepro is to take regular old print output and
print it to a file with nocodes, that stick it into a minimal file like
above with only the <pre></pre> tag around the whole thing.
--------
To: larry at hoovercs.com
From: larry at hoovercs.com
Subject: test message
Content-Type: text/html
<html><body><pre>
(entire filepro form printed with nocodes)
</pre></body></html>
--------
--
bkw
More information about the Filepro-list
mailing list