|
How to send an mime/html-email by command line ?
Hi there,
I'm trying to send a html-email with an attached pdf encoded by mime and uuencode through a command line like:
cat html-email.txt | mail
more html-email.txt
TO: test@test.com
FROM: test@test.com
Subject: html-email-Test
MIME-Version: 1.0
Content-type: multipart/mixed; Boundary="boundary-string"
--boundary-string
Content-Type: text/html
<HTML><HEAD><TITLE>TEST</TITLE></HEAD>
<BODY>
<H1> Hello ! </H1>
Bla<BR>
Bla2<BR>
<HR>
Bla-End<BR>
</BODY>
</HTML>
--boundary-string
Content-Type: application/pdf
Content-Disposition: attachment; filename="reader.pdf"
Content-transfer-encoding: uuencode
begin 644 reader.pdf
M)5!$1BTQ+C0-)>+CS],-"C(P,S@@,"!O8FH-/#P@#2],:6YE87)I>F5D(#$@
...
F.#5F934Y9F8W93`S/ET-/CX-<W1A<G1X<F5F#3$W,PTE)45/1@T`
`
end
--boundary-string
It works if I give the TO: at the commandline, but when I open it, it's just many letters, the content is not recognized.
What have I to do that mail get the addresses out of the file and when I open it's HTML with attachement ?
TIA
Fluppi
|