How to modify SMTP from-address?
I have the following SMTP Configuration:
Regardless of what I have above, when I use the Email Agent in the VPE I can type anything I want in the From field and that is what will show when the recipient gets the email. If can be a full email address like name@company.com or something simple such as David – both work.
When I use sendmail from a script, the email always shows as coming from root [root@hostname.company.com] (display name is root, email address is root@hostname.company.com). This happens whether I log in as David or Admin.
My basic script works like this:
(echo "Subject: Your Password"
echo "To: recipient@company.com"
echo "Content-Type: TEXT/HTML; charset=US-ASCII"
echo ""
echo ""
echo ""
echo "Your password is: 12345"
echo "
") | sendmail recipient@company.com
I have tried adding “From: sender@company.com” and –fsender@company.com but it always comes out as root [root@hostname.company.com]. Not sure if it makes a different but 100% of the mail is staying internal which is why I want to change the name of the Sender to something like vpn@company.com.
Thanks,
David
APM 11.5.3