Ubuntu-14.04 [SOLVED]: How can I change displayed name as sender?

Ubuntu-14.04 [SOLVED]: How can I change displayed name as sender?

Home Forums Ubuntu 14.04 Ubuntu-14.04 [SOLVED]: How can I change displayed name as sender?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36618

    Anonymous

    QuestionQuestion

    I send email from my server like this:

    echo "This is the body of the email" | mail -s "This is the subject line" user@example.com
    

    Noted that I replace user@example.com 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?

    #36619

    Anonymous

    Accepted AnswerAnswer

    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 <sender@domain.com>" -s Test recipient@domain.com
    

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

    Source: https://askubuntu.com/questions/988912/how-can-i-change-displayed-name-as-sender
    Author: fkraiem
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.