LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   sendmail with file subject and sender name (https://www.linuxquestions.org/questions/linux-server-73/sendmail-with-file-subject-and-sender-name-695064/)

Elnegro8 01-05-2009 04:30 AM

sendmail with file subject and sender name
 
hello to all

how do i send mail using sendmail with subject and sender name and some texst

for example i use :

echo "test" |mail -s "hello" tt@tt.com

its ok and cool but if i want to add the send name as well with subject and some texst in the mail :

echo "test" |mail -s "hello" |mailsend -f tzahia tt@tt.com

any idaes ?


mail -s = subject

mailsend -f tzahia = sender name

echo "test" = mail body message

10xxx

TB0ne 01-05-2009 08:47 AM

Quote:

Originally Posted by Elnegro8 (Post 3397618)
hello to all

how do i send mail using sendmail with subject and sender name and some texst

for example i use :

echo "test" |mail -s "hello" tt@tt.com

its ok and cool but if i want to add the send name as well with subject and some texst in the mail :

echo "test" |mail -s "hello" |mailsend -f tzahia tt@tt.com

any idaes ?

Check out the man page for mail (or mailx), and sendmail. The 'from' field has a switch so you can specify it on the command line, along with the subject.


All times are GMT -5. The time now is 02:42 AM.