Gmail SMTP will no longer be supported. What’s next?

I was using gmail smtp with PHP application for a long time and now they stopped the smtp .

After looking for a solution for a some time, I found this easy way. ( not sure whether its the easiest way, ping me if not )

I used raspberry pi 4 with LAMP for testing.

  1. How to install LAMP on raspberry pi
  2. Install sSMTP
    • Remove any previous mail palcakge
      1. service sendmail stop
      2. service postfix stop
      3. sudo apt-get remove sendmail
      4. sudo apt-get remove postfix
  3. Install sSMTP
    • sudo apt-get install ssmtp
    • nano /etc/ssmtp/ssmtp.conf

For me the free quota from elasticemail is more than enough.

It’s now ready for testing

$message = "Hi, how are you doing?";
mail('', 'Email Subject', $message);

Check the log for any errors

tail -f /var/log/mail.log

Following sites were updated with LAMP+sSMTP message sending functionality ( & )


About buminda
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s