sendmail subject to append dynamically.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sendmail subject to append dynamically.
# 1  
Old 11-23-2005
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
# 2  
Old 11-23-2005
I can't see why you would use sendmail if it's from the command line - if you use mailx, then you could just do the following although I would be careful on the amount of data in 'somefile' being added to the subject:

mailx -s"STATIC INFO `cat /somedir/somefile`" mymail@mydomain.com < /otherdir/mymailfile

If you are writing a script, then there may be a way to use sendmail and change part of the subject to be static and part not since you could set up a variable to create both parts of the whole subject.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

To get the id value dynamically

Hi, I have .html file and need to get the id value based on the latest modified date from the html file. output : 1456. Thanks in advance Here is the .html file <html> <head><title>Index</title> </head> <body> <h1> BI EI Team</h1> <pre>ID Last modified ... (5 Replies)
Discussion started by: Kumar786
5 Replies

2. 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

3. Shell Programming and Scripting

awk dynamically append columns into file

Hi, I have a large data file, want to separate it into 100 part and export one specific field as a file; then I want to append each part's column into one file. How to realize that? 1 2 3 1 2 3 4 2 2 3 4 3 3 3 4 4 3 4 5 5 3 4 5 6 I want the last column of the data file, e.g divide it... (5 Replies)
Discussion started by: wanliushao
5 Replies

4. 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

5. 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

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. UNIX for Advanced & Expert Users

configure sendmail to append domain

I am running redhat enterprise 4 with sendmail version 8.13. I am trying to configure sendmail to append the domain to localpart. For example If i send an email to “username”. I want sendmail to append the “username” with @bbl.com I tried modifying the following in /etc/mail/sendmail.mc ... (2 Replies)
Discussion started by: hassan1
2 Replies

9. Shell Programming and Scripting

getting value from field dynamically

how i do pass in field number when cutting, I tried to do this: but it says 11-1: not found (12 Replies)
Discussion started by: finalight
12 Replies

10. Shell Programming and Scripting

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?? (11 Replies)
Discussion started by: wannalearn
11 Replies
Login or Register to Ask a Question