Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'm new to raspberry pi.

I installed the raspian OS on it. I want to send emails from it using my gmail account. I want to send from the command line interface and from php scripts.

I followed this guide.

I did steps 1,2,3,4 from the link.

When I send an email using the code below using

echo "Test text" | mail -s "Test Mail"

nothing happens, there is nothing printed on the screen, and I don't get the email.

On "revaliases", if I replace "" with "", then I get back a message saying

send-mail: Cannot open


send-mail: Server didn't like our AUTH LOGIN (530 5.7.0 Must issue a STARTTLS command first. ml2sm3592928igb.10 - gsmtp)

How can I fix this?

Here are the two files below:


# Config file for sSMTP sendmail
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
# root=postmaster

# The place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named
# mailhub=mail

# Where will the mail seem to come from?

# The full hostname

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address


# sSMTP aliases
# Format:   local_account:outgoing_address:mailhub
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
share|improve this question
Gmail is probably delivering the messages to your Spam folder. – jasonwryan Dec 21 '13 at 0:15
I looked in the junk folder, but none of them are there... – omega Dec 21 '13 at 0:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.