Email Configuration with Gsuite

Found a solution by myself,

For G suite Accounts, follow the bellow steps.

(Login to your admin console from, admin@yourdomin.com)

  1. Go to Admin console: https://admin.google.com/
  2. Go to Security
  3. Select 2-Step Verification:
  4. Select Higher Organizational unit:
  5. Allow users to turn on 2-Step Verification:

Now: (From your required mail id, i.e., journalmail@yourdomin.com)

  1. Go to Manage Accounts: https://myaccount.google.com/
  2. Go to Security (Left side bar)
  3. 2-Step Verification (redirects to login again) to Switch on
  4. Again login to Manage Accounts to Security.
  5. App Password (redirects to login again)
  6. Select App to Other(Custom Name)
  7. Name your app and click generate.
    .
    .
    (It is not my app password, it is taken from google search.)
    image
    (It is not my app password, it is taken from google search.)
    .
    .
    Now open config.inc.php from your file manager, change the settings.

[email]
; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = smtp.gmail.com
smtp_port = 587

; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
smtp_auth = tls
smtp_username = journalmail@yourdomin.com
smtp_password = ******* (app password)

Enjoy Sending Mail