Now it works! @psychobunny plz check it out and do a code review if you have the time 😉
How change sending domain ?
-
This post is deleted! -
sudo apt-get install mailutils sudo apt-get install postfix
and
sudo nano /etc/postfix/main.cf
inet_interfaces = all
change to:
inet_interfaces = localhost
sudo service postfix restart echo "This is the body of the email" | mail -s "This is the subject line" user@example.com sudo nano /etc/aliases # See man 5 aliases for format postmaster: root root: sammy@example.com
-
@Dawid-Glomba Good advice, but I don't think it will do anything, he's using SparkPost, not postfix.
That said, something is wrong with your SparkPost. It is failing back to the local address because SparkPost is not working.
The
invalid domain
message is coming from SparkPost, because you have not properly set up your DNS records.Following these instructions should fix it for you.
-
Have you set the email settings in the admin panel?