User avatar
RDK
Posts: 262
Joined: Wed Aug 13, 2014 10:19 am
Location: Wyoming and France

Setting Up E-Mail

Mon Sep 15, 2014 6:51 am

Folks....I have set up e-mail using this link: http://rpi.tnet.com/project/faqs/smtp

Code: Select all

sudo apt-get install ssmtp 
sudo apt-get install mailutils
sudo apt-get install mpack
and then configured it like this

Code: Select all

#
# Config file for sSMTP sendmail
#

root=me@mydomain.com

# The full hostname
hostname=MyRasPi

AuthUser=me@gmail.com
AuthPass=myGmailpw
FromLineOverride=YES
mailhub=smtp.gmail.com:587
UseSTARTTLS=YES

#AuthUser=me@mydomain.com
#AuthPass=mypw
#mailhub=mail.mydomain.com:465
The above setup works and the test line

Code: Select all

echo "sample text" | mail -s "Subject" myid@hotmail.com
works with the note arriving at my Hotmail account.

But, in fact, I do not want to use Google's Gmail system. I have my own domain and mail server.
I modified the above ssmtp.conf to use the hash-ed out lines to replace the Gmail lines. When I use Outlook I have to configure my outgoing (SMTP) server "requires authentication" and needs to use SSL and port 465. When I now try the above mail command it just hangs and I have to control-C to get back to the command line prompt.

What am I doing wrong? Thanks...RDK

Return to “Beginners”