UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 28th, 2006, 08:29 AM
cristane cristane is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 14 cristane User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m 3 sec
Reputation Power: 0
Send mail with attachment from command line

Hello

I have a question. I'm trying to send an email containing an attachment, directly from the command line.

If I use sendmail, I have something like this:

cat filename | uuencode filename | sendmail -fSender<senderemail@mail.com> cristi.tane@xnet.ro

This sends filename as an attachment, but I can't seem to be able to enter a Subject and a message body.

On the other hand, if I use mailx:

cat filename | uuencode filename | mailx -s "Subject" cristi.tane@xnet.ro

This sends filename as an attachment, but in this case I can't seem to be able to enter a message body in the command line.

Any ideas?

Thank you.

Reply With Quote
  #2  
Old August 28th, 2006, 09:18 AM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,345 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 39 m 18 sec
Reputation Power: 55
Here are several FAQ threads that deal with everything you need:
http://www.unix.com/forumdisplay.php?f=22

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Send mail with attachment from command line

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap