Is there an easy way to send a formatted html message AND an html
attachment from AIX/UNIX? We need to send our users reports that are
quite wide, and when it goes to Notes the columns are wrapped and it
doesn't look pretty.
What the users want is an email with an abbreviated report of a few
fields, and then an html attachment that displays the entire report.
They want the email in html so it has the bold/highlighted text, table
format, etc.
The mail command doesn't send html message, but you can send an html
attachment with uuencode.
The sendmail command will send the html message, but will not allow
attachments (at least I can't figure out how).
Any ideas?
Mark
|
|
0
|
|
|
|
Reply
|
noonehere
|
3/30/2006 3:37:19 PM |
|
In article <1143733039.480635.302720@t31g2000cwb.googlegroups.com>,
<noonehere@mail.com> wrote:
>Is there an easy way to send a formatted html message AND an html
>attachment from AIX/UNIX?
>The sendmail command will send the html message, but will not allow
>attachments (at least I can't figure out how).
Try matt at ftp://ftp.tecgraf.puc-rio.br/pub/lhf/matt.tar.gz but you'll
need mmencode.
|
|
0
|
|
|
|
Reply
|
lhf
|
3/30/2006 7:08:15 PM
|
|
noonehere@mail.com wrote:
> Is there an easy way to send a formatted html message AND an html
> attachment from AIX/UNIX? We need to send our users reports that are
> quite wide, and when it goes to Notes the columns are wrapped and it
> doesn't look pretty.
>
> What the users want is an email with an abbreviated report of a few
> fields, and then an html attachment that displays the entire report.
> They want the email in html so it has the bold/highlighted text, table
> format, etc.
>
> The mail command doesn't send html message, but you can send an html
> attachment with uuencode.
>
> The sendmail command will send the html message, but will not allow
> attachments (at least I can't figure out how).
>
> Any ideas?
>
> Mark
>
You can simplify this, by sending a user a notice that their report is
done and that it can be viewed at http://yoursite/login
AK
|
|
0
|
|
|
|
Reply
|
AK
|
3/30/2006 10:52:03 PM
|
|
This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.
--=_mimegpg-commodore.email-scan.com-9313-1143763062-0008
Content-Type: text/plain; format=flowed; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
X-Mime-Autoconverted: from 8bit to quoted-printable by mimegpg
noonehere@mail.com writes:
> Is there an easy way to send a formatted html message AND an html
> attachment from AIX/UNIX? =E2=80=A6
Yes. You can also to do the same thing from Linux, BSD, Windows, and eve=
n=20
Commodore 64 (if you somehow hook one up to the Internet).
The Internet standard for formatting content is called MIME, and it is=20
irrelevant who sends a MIME message, as long as it is formatted correctly=
..=20
It is a simple matter of constructing a message with a multipart/mixed=20
content type, and two sections: a text/html section marked for inline=20
disposition, and a second text/html section marked for attachment=20
disposition.
> The sendmail command will send the html message, but will not allow
> attachments (at least I can't figure out how). =20
sendmail doesn't give a damn what you're sending (with very few exception=
s=20
that are not relevant here).
You need to create a message that's formatted, more or less, as shown bel=
ow.=20
You will also need to read, AND UNDERSTAND, at least the following=20
specification:
http://www.ietf.org/rfc/rfc2045.txt
http://www.ietf.org/rfc/rfc2046.txt
There are tools that can easily assemble a message, like the following fo=
r=20
you. But you need to understand MIME, before you try to use them.
Anyway, you need to assemble a message that looks approximately like this=
:
From: whoever
To: whoever
Subject: whatever
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=3D"MIME_BOUNDARY_FLOORDYBOOP"
Beavis, and Bigfoot, sitting-in-a-tree...
--MIME_BOUNDARY_FLOORDYBOOP
Content-Type: text/html
Content-Disposition: inline
<html>
[ your HTML message ]
</html>
--MIME_BOUNDARY_FLOORDYBOOP
Content-Type: text/html
Content-Disposition: attachment; filename=3D"attachment.html"
<html>
[ Your attachment ]
</html>
--MIME_BOUNDARY_FLOORDYBOOP--
To understand what all of the above means, and how it works, you will nee=
d=20
to read the documentation at the above URLs.
Also, note, that although the above may be a well-formed MIME message, it =
is=20
always possible for buggy mail software to screw it up, and not handle it=20
correctly. All I can tell you is that the above MIME formatting is corre=
ct,=20
and describes an E-mail message that consists of two parts: main HTML=20
content, that should be shown, and an attached file, which also contains=20
HTML content. If Notes can't handle it, go bitch at IBM to fix their=20
software.
--=_mimegpg-commodore.email-scan.com-9313-1143763062-0008
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQBELHB2x9p3GYHlUOIRAjaQAJ9FnFQvGgiyK1/Oum/T7PJkewyDUwCbB8/h
OEd/nzJOj0F666+AQmC+48E=
=jV6t
-----END PGP SIGNATURE-----
--=_mimegpg-commodore.email-scan.com-9313-1143763062-0008--
|
|
0
|
|
|
|
Reply
|
Sam
|
3/30/2006 11:57:42 PM
|
|
noonehere@mail.com wrote:
: Is there an easy way to send a formatted html message AND an html
: attachment from AIX/UNIX? We need to send our users reports that are
: quite wide, and when it goes to Notes the columns are wrapped and it
: doesn't look pretty.
: What the users want is an email with an abbreviated report of a few
: fields, and then an html attachment that displays the entire report.
: They want the email in html so it has the bold/highlighted text, table
: format, etc.
: The mail command doesn't send html message, but you can send an html
: attachment with uuencode.
: The sendmail command will send the html message, but will not allow
: attachments (at least I can't figure out how).
http://nisoftware.com/files/mailattach
is an example of how to use Perl and MIME::Lite to generate (and send) a
multi part message.
You could use the above utility by creating a text version of your
contents and an html version of your contents and then typing something
like
echo "This message has a text and an html attachment" | \
mailattach someone@some.where.com -- myfile.txt myfile.html
(The echo is because the utility requires input from standard input.)
If you don't like the syntax or whatever then use it just as an example.
|
|
0
|
|
|
|
Reply
|
yf110
|
3/31/2006 1:02:17 AM
|
|
|
4 Replies
1311 Views
(page loaded in 0.064 seconds)
|