Networking Forums

Networking Forums > Computer Networking > Linux Networking > question on mail command

Reply
Thread Tools Display Modes

question on mail command

 
 
Angus Comber
Guest
Posts: n/a

 
      10-06-2005, 05:40 PM
Thanks.

I had a go and have used this for example:

mail (E-Mail Removed) -s MySubject -a attachedfile

That works but it prompts you to enter a body text etc. How can I write the
line without having to then interactively enter body text. I will be
calling this from a batch program.

Angus



 
Reply With Quote
 
 
 
 
Davide Bianchi
Guest
Posts: n/a

 
      10-06-2005, 06:22 PM
On 2005-10-06, Angus Comber <(E-Mail Removed)> wrote:
> I had a go and have used this for example:
> mail (E-Mail Removed) -s MySubject -a attachedfile
> That works but it prompts you to enter a body text etc. How can I write the


in your script:

mail .... << EOF
this is a simple text
EOF

Should do the trick

Davide

--
Linux -- Have you administered a real OS today?
 
Reply With Quote
 
Bit Twister
Guest
Posts: n/a

 
      10-06-2005, 09:18 PM
On Thu, 6 Oct 2005 18:40:33 +0100, Angus Comber wrote:
> Thanks.
>
> I had a go and have used this for example:
>
> mail (E-Mail Removed) -s MySubject -a attachedfile
>
> That works but it prompts you to enter a body text etc. How can I write the
> line without having to then interactively enter body text. I will be
> calling this from a batch program.


I'll do something like

mail -s "whatever" (E-Mail Removed)e < file_name_here

if just a reminder
mail -s "whatever" (E-Mail Removed)e < /dev/null

Now running that in batch, I would do something like
mail -s "ch 04 Stargate" $_tv_email < /dev/null > /dev/null
to keep from getting a batch notification message issued by mail.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a command line e-mail notifier for POP3 servers? Ant Linux Networking 2 01-13-2012 09:02 PM
OT. A Windows Live Mail question which I use . David Broadband 1 07-15-2010 06:03 PM
mail command | view local machine mail with Mozilla @(none) Linux Networking 1 10-17-2004 10:42 AM
question about tc command mataricos Linux Networking 0 09-30-2004 03:45 PM
DNS/Mail configuration question Sean Langley Linux Networking 3 11-28-2003 01:45 AM



1 2 3 4 5 6 7 8 9 10 11