sendmail subject


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sendmail subject
# 1  
Old 04-28-2007
sendmail subject

what is the syntax for sending a subject ?

sendmail -t a@b.com

The person receives the mail with an empty subject!

the man pages dont give anything related to subject...anybody??
# 2  
Old 04-28-2007
Quote:
Originally Posted by wannalearn
what is the syntax for sending a subject ?

sendmail -t a@b.com

The person receives the mail with an empty subject!

the man pages dont give anything related to subject...anybody??
Check these links
http://mail-index.netbsd.org/netbsd-...7/18/0000.html
http://forums.macosxhints.com/archiv...p/t-24414.html
# 3  
Old 04-28-2007
hmmm..

Hi When i use the syntax given in the site ..i get a ">" after executing the below line

When i type the below and hit enter
cat <<content | sendmail -t a@b.com


I get this
cat <<content | sendmail -t a@b.com
>

and when i type in
cat <<content | sendmail -F Me -t a@b.com
>Subject:hello

I am getting the mail with the subject hello

but how do we input the subject using a script?


I am already using mail -s but the problem is it doesnt allow us to mention a from address :-(
# 4  
Old 04-29-2007
If you have mailx installed, you can use the -r option.

Else...
Code:
$ SUBJECT="Testing some mail stuff"
$ cat << EoF | /usr/lib/sendmail -F me@here.com -t you@there.com
> Subject: $SUBJECT
> Testing stuff
> EoF

Cheers
ZB
# 5  
Old 04-29-2007
Hmmm....

I know this works when you type this in the command prompt..I can type my own body and its done..

My concern being the same cannot be reproduced if I put this in a script and want the body contents to be taken from a file

I have the contents in a file named text

And each time i execute the script sendmail should a send a mail with subject:testing and the contents from the file text
# 6  
Old 04-29-2007
Code:
echo "Subject: Testing" | cat - text | /usr/lib/sendmail -F me@here.com -t you@there.com

Cheers
ZB
These 2 Users Gave Thanks to zazzybob For This Post:
# 7  
Old 04-29-2007
thanks

Why didnt i think of this :-)

Working Gr8! Thanks!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Clarifying sendmail configuration - sendmail-client offline

Hi all, I have read about sendmail running as 2 separate process. 1 as a MSP, and the other as the real daemon or MTA. In my current configuration, the sendmail-client is disabled. Both submit.cf and sendmail.cf are left as default untouch I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies

2. UNIX for Advanced & Expert Users

Sendmail questions, SCO 5.0.6 sendmail 8.11.0

I am running SCO 5.0.6 and using sendmail 8.11.0 and having issues with smtp authentication. When trying to send mail the following message will kick back. (reason: 530 5.7.1 Authentication required) 530 5.7.1 Authentication required Not sure what needs to be tweeked in sendmail.cf but I... (1 Reply)
Discussion started by: ziggy6
1 Replies

3. UNIX for Advanced & Expert Users

AIX - Sendmail - add hostname to subject of outgoing mail

Hello, I'm configuring sendmail on an AIX 7.1 server (bos.net.tcp.client 7.1.1.15). I've gotten sendmail to send mail through our Novell GroupWise server, so that mail from a user on the server appears to come from their GroupWise account, and replies to the email would go to their GroupWise... (0 Replies)
Discussion started by: eyebeam
0 Replies

4. AIX

Sendmail

How do I run sendmail in non-daemon mode in AIX (3 Replies)
Discussion started by: ranasarkar
3 Replies

5. Solaris

Sendmail

I have sendmail enabled in my Solaris 10 boxes. It has being flagged as an violation to unix security standard as the port 25 is listening. I want to run the sendmail to run in non-daemon mode so that the queue is processed. Please help. (0 Replies)
Discussion started by: ranasarkar
0 Replies

6. UNIX for Dummies Questions & Answers

How to set Subject in Sendmail in Crontab

Hello All, I am trying to send a file through email everyday from one of my Linux (x86_64) system. I've scheduled Sendmail in Crontab like this- 00 8 * * * /usr/sbin/sendmail name@xxx.co.uk < /home/file1.out This entry in crontab is working very fine and I am receiving file file1.out... (10 Replies)
Discussion started by: NARESH1302
10 Replies

7. Shell Programming and Scripting

Unable to populate subject field of the email while using sendmail

Hi, Can anyone kindly provide some information about how to populate the subject field of the email while using the sendmail utility ? Itried the following command line argument : echo -e "Body of the email" | /usr/lib/sendmail -f from@from.com -t to@to.com -s " Subject of the email" ... (4 Replies)
Discussion started by: sdiptanil
4 Replies

8. Red Hat

sendmail help

Dear All how the root user i.e root@localhos.localdomain can be masqueraded in sendmail i want to masquerade the above to say test@test.com Regards and thanks in advance (3 Replies)
Discussion started by: surfer24
3 Replies

9. Shell Programming and Scripting

sendmail subject to append dynamically.

Hi, I have to use sendmail from command line, and we need to append a static string in subject to a new value from file.Is there any way to do it. Thanks Shrikrishna (1 Reply)
Discussion started by: shrikrishna
1 Replies

10. UNIX for Advanced & Expert Users

sendmail

When I try to use mailx on AIX 5.2 I get the following message: "The flags you gave make no sense since you're not sending mail." The type of command sent is as follows: mailx -s "Test" -c gilstanden@hotmail.com < sendmail.pid but it just gives the message referenced previously. Do I need to... (1 Reply)
Discussion started by: gstanden
1 Replies
Login or Register to Ask a Question