Depending on how you set up your website, you may or may not have to install the software to get things going. Sometimes, it’s more simple than you can imagine.
It’s a no-brainer for a business websites. I don’t think a salesperson at Wal-Mart, for example, would send email to a customer without the “walmart.com” domain name as part of the address. It would be confusing as well as unprofessional. As a customer, I want to know if the person I’m communicating with actually represents the company.
It’s not that important if it isn’t a business website. Still, you can do one or two things if you want to seem professional. You can install a mail server on your hardware server or you can get professional email hosting. G Suite (by Google) includes that service but it isn’t cheap.
You can start with a free account at Zoho but it has limitations. If you want to do some things that I can already do with Gmail, you have to pay $24 a year. The free account doesn’t include POP3 or IMAP access.
If professionalism doesn’t matter, you may as well use something like Gmail. With MSMTP, you can have forms send messages through Gmail, using it as a mail hub. Even if your website doesn’t support commenting, you still need a contact form. That is, unless you don’t mind exposing your email address.
I don’t know what operating systems you can install MSMTP on, other than Linux. It will probably work with some flavor of BSD but probably not with Windows anything.
With Ubuntu and other Debian derivatives, it’s this easy to install:
apt install msmtp msmtp-mta
When I installed it, it didn’t come with a configuration file. I had to create one:
Here’s the configuration, with my information altered:
account gmail host smtp.gmail.com port 587 from firstname.lastname@example.org user email@example.com password mypassword auth on tls on tls_trust_file /etc/ssl/certs/ca-certificates.crt account default: gmail logfile: /var/log/msmtp.log
When using the PHP mail function, use your email address as the from and to addresses. The email address for the person contacting you is the “reply to” address. If you include some of the headers in the body of the message, you can readily spot the spammers.
I have my website set up with MSMTP and I use Thunderbird to retrieve my email from Gmail using POP3. I don’t see any point in having a professional email domain name for this website. It isn’t even close to being a business.
I’ve had multiple websites for far longer than I can remember, probably since before the turn of the century. Until Google came along with Gmail, I installed the works on my server. I don’t remember all the details but I received mail with Courier and sent mail with Postfix. I always had issues when setting it all up.
Thank goodness it’s so much simpler today. One last thing… I’m not talking about security. I haven’t mentioned secure email because getting all the features from the providers who offer it will cost more than I can afford.