Article 6FA7P set up sendmail on my laptop

set up sendmail on my laptop

by
Pedroski
from LinuxQuestions.org on (#6FA7P)
Can I set up sendmail at home on my laptop to actually send a mail from a simple contact page html file, using PHP?

My contact page works fine from my little cloud server, just trying to make it work at home, if that can be done!

Following this tutorial, I installed sendmail and related things.

It says I must have these lines in /etc/mail/sendmail.mc

Quote:
define(`SMART_HOST', `your.smtp.server')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')dnl
I believe my smtp server is: qq.smtp.com for qq mail. But I remember when I used to fetch emails with Python, I needed the IMAP server and IMAP password.

As sudo, using nano, I created /etc/mail/authinfo with the following content:

Quote:
AuthInfo:qq.smtp.com "U:me@foxmail.com" "P:topsecret" "M:PLAIN"
/etc/mail/authinfo.db did not exist but was created with:

Quote:
sudo makemap hash /etc/mail/authinfo < /etc/mail/authinfo
Also, must I start all lines in /etc/mail/sendmail.mc with dnl ???

After following all the instructions from the link above, I did this in bash

Quote:
echo "This is a test email." | mail -s "Test Email" myname@gmail.com
But I did not get the email!

Any tips please?
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