LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-18-2007, 07:24 AM   #1
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Rep: Reputation: 15
Question sendmail - set title


Hey,

This might sound a bit dumb but I'm working on a script that requires an email to be send if certain conditions are met. To do this i use:

Code:
sendmail -f "emai@domain.com" -F "User" email@domain.com < file.txt
"sendmail" is the only possible option to do this.
What I don't know (and I couldn't find on Google, though I've tried) is how to set the email TITLE. If I run it the way it is now it sends the mail with all the information as it's supposed to be but with no title.

Thanks
 
Old 12-18-2007, 07:58 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
At the beginning of the file which contains the mail body (file.txt) you can specify the fields of the mail header, as in:
Code:
From: sender@domain.com
To: recept@domain.com
Cc: another@domain.com
Subject: Hello world!
In this way you can fill all the fields which appear in the header. Note that you can specify any sender in the "From:" field, even if it's different from the real sender (that one you specify with the -f option).
 
  


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
Can you dynamically set the title of new tabs in gnome terminal? hroit Linux - General 1 08-13-2007 05:24 AM
How to set mlterm title? fossilet Linux - Software 2 04-13-2005 01:10 AM
Set the Xterm title to reflect the current time ! Bonch Linux - Newbie 11 10-25-2004 05:50 PM
How to set title in xterm according to what program running ? tvn Linux - General 1 07-25-2004 08:58 PM
How to set the window title for Eterm dynamically? MiscGeek Linux - Software 4 09-29-2003 10:33 PM


All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration