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
sudo nano /etc/postfix/main.cf
inet_interfaces = all
inet_interfaces = localhost
sudo service postfix restart echo "This is the body of the email" | mail -s "This is the subject line" firstname.lastname@example.org sudo nano /etc/aliases # See man 5 aliases for format postmaster: root root: email@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.
invalid domainmessage 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?