Hi Tony,
 
Thanks! That was definitely the answer I was looking for.
Originally I wanted to use sendmail for this but I couldn't seem to get the encoding right on the PDF file. It would send through ok but when it came to opening it, Acrobat would throw it out as a corrupted file, so I gave up on that and used Mutt.

This way makes things so much easier for me.
 
Thanks again.
________________________________________________________________
Kevin Green
KD Micro Software
[EMAIL PROTECTED]

MP 107, Market City, 280 Bannister Road, Canning Vale WA 6155.
Phone: 9256 1566 (2778 internal)     Mobile: 0419 949 254.

 
----- Original Message -----
From: "Anthony E. Greene" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 11, 2002 11:30 AM
Subject: Re: Mutt and text/html

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 11-Jul-2002/10:52 +0800, Kevin - KD Micro Software <
[EMAIL PROTECTED]> wrote:
> >This is probably a dumb question but I've looked everywhere and can't
> >find the answer to this.  I'm using Mutt to send out an email with a PDF
> >attachment using the command:
> >
> >echo "" >/dev/null | mutt -a $pdf -H $elog
> >
> >with $pdf being set by my script as the PDF file and $elog is the actual
> >message body file.  File $elog contains this:
> >
> >From: $fromname <$fromemail>
> >To: $sendlogto
> >Subject: $fromname: E-Mail Log
> >
> >The mail log is attached.
> >
> >This itself works perfectly. But what I would like to do is have HTML
> >code inside the message body. Adding the Content-Type: text/html line to
> >the $elog file doesn't seem to let this work because the Content-Type
> >gets overwritten by Mutt putting in the Content-Type: multipart/mixed;
> >boundary="ZPt4rx8FFjLCG7dd" because of the attachment.
> >
> >Does anyone know of any way I can get Mutt to set the Content-Type for
> >the message body?
>
> Send both the PDF and the HTML as attachments. Otherwise there is no way
> to set the MIME boundary correctly.
>
> Another way is to use mmencode to do the Base64 encoding, have the script
> create all the message headers and MIME boundaries and pipe the result to
> sendmail. You can use my sendfile.sh script as a starting point.
>
>  
http://www.pobox.com/~agreene/downloads/
>
> Just add a text/html part with "Content-Disposition: inline". That whould
> work fine.
>
>
> Tony
> - --
> Anthony E. Greene <
mailto:[EMAIL PROTECTED]>
> OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
> AOL/Yahoo Messenger: TonyG05    HomePage: <
http://www.pobox.com/~agreene/>
> Linux. The choice of a GNU generation <
http://www.linux.org/>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: Anthony E. Greene <
mailto:[EMAIL PROTECTED]> 0x6C94239D
>
> iD8DBQE9LPimpCpg3WyUI50RAlonAKDA+274be3X82GtkWKz/K8v76kh2QCgrjbP
> a+bsHA4z+WfRI9AzeQct76k=
> =NPLo
> -----END PGP SIGNATURE-----
>
>
>
> _______________________________________________
> Redhat-list mailing list
>
[EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to