Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

How can I change displayed name as sender?

Writer Emily Wong

I send email from my server like this:

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

Noted that I replace 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?

2 Answers

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 <>" -s Test 

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 <>, so in this example it would be Joe Sender.

2

Using mail, you can set the username using the proper syntax, such as echo "Test" | mail -a "From: Someone <>" .

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy