Setup SMTP with Gmail - aalfiann/reSlim GitHub Wiki
Setup SMTP with Gmail
- Login to your gmail
- Go to this link >> https://myaccount.google.com/security?pli=1#connectedapps
- Enable Less Secure Apps
Here is the example smtp config to be working with smtp gmail
/**
* Configuration SMTP for Mailer
* Note for gmail you need to enable less secure app at here >> https://myaccount.google.com/security?pli=1#connectedapps
*/
$config['smtp']['host'] = 'smtp.gmail.com';
$config['smtp']['autotls'] = false;
$config['smtp']['auth'] = true;
$config['smtp']['secure'] = 'tls';
$config['smtp']['port'] = 587;
$config['smtp']['defaultnamefrom'] = 'admin';
$config['smtp']['username'] = '[email protected]';
$config['smtp']['password'] = 'yourpassword';
$config['smtp']['debug'] = 0;
Note:
- For the first time, you will get critical message from gmail, then just check activity and confirm that was me.
- If your server IP address was changed, you need to check activity and reconfirm that was me again.