LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-08-2004, 09:26 AM   #1
fluppi
Member
 
Registered: Oct 2003
Location: Switzerland (Europe)
Distribution: OpenSuSE, RedHat, Knoppix, IRIX + MacOSX
Posts: 198

Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
send email from command line djionel82 Programming 6 11-29-2005 12:12 AM
Send HTML mail via command line interface xlash Linux - General 2 11-02-2005 01:02 PM
send email with mutt on command line naijaguy Linux - General 1 12-29-2004 06:33 PM
trying to send internet email from a command line...is it possible rutman Linux - Newbie 8 06-26-2004 02:19 AM
Can Pine send an email without from the command line without.. rutman Linux - Newbie 2 06-11-2004 04:34 PM


All times are GMT -5. The time now is 08:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration