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

<?php
$message = "Hi, how are you doing?";
mail('youremail@domain.com', '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 ( http://buminda.com & http://buminda.com.au )

Advertisement

About buminda

buminda.com
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:

WordPress.com Logo

You are commenting using your WordPress.com 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