Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 9444  / 2 Years ago, wed, august 3, 2022, 1:23:22

I send email from my server like this:



echo "This is the body of the email" | mail -s "This is the subject line" [email protected]


Noted that I replace [email protected] with a real email address. And it works. Just I need to know, where this nickname comes from?



enter image description here



I use ubuntu 14.04 on the server and I want to know how can I change that name?


More From » 14.04

 Answers
0

Don't use mail, there are better command-line MUAs, such as mailx (package bsd-mailx) or mutt.



mailx will do what you want with the -r flag:



echo Test. | mailx -r "Joe Sender <[email protected]>" -s Test [email protected]


You can likewise specify a display name for the recipient, by the way.



The nickname shown in for instance gmail.com comes from the part of the From field that is outside <[email protected]>, so in this example it would be Joe Sender.


[#9466] Thursday, August 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rialhirt

Total Points: 422
Total Questions: 113
Total Answers: 120

Location: France
Member since Sun, May 15, 2022
2 Years ago
;