Article 6DS13 Change from address Sendmail using php script

Change from address Sendmail using php script

by
centos_noob
from LinuxQuestions.org on (#6DS13)
Hi, I am scratching my head as to why when an email is sent with sendmail, it uses a random data@[random azure domain name] to send the email.
I have altered the local-host-names file in /etc/mail so that only a valid domain is there, yet it still happens.

How can I change the from address used?

mail.php was generated using a web sit tool called Rapidweaver

Server is Ubuntu 22.04
Running in Azure
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments