Answers.Body: <p>I'm not sure how your email address got blocked, but Craft 3 uses the same SMTP <code>smtp.gmail.com</code> server and settings that Craft 2 uses when you choose to send email via "Gmail"</p>
  
  <p><a href="https://github.com/craftcms/cms/blob/develop/src/mail/transportadapters/Gmail.php#L91-L97" rel="nofollow noreferrer">https://github.com/craftcms/cms/blob/develop/src/mail/transportadapters/Gmail.php#L91-L97</a></p>
  
  <p>Sending email through PHPMail/sendmail is notoriously unreliable and I wouldn't recommend it on production.</p>
  
  <p><a href="https://craftcms.com/support/troubleshooting-email-errors#dealing-with-email-delivery-issues" rel="nofollow noreferrer">https://craftcms.com/support/troubleshooting-email-errors#dealing-with-email-delivery-issues</a></p>
  
  <p>And there are quite a few steps you can take to help ensure your email doesn't get treated as SPAM: <a href="https://blog.codinghorror.com/so-youd-like-to-send-some-email-through-code/" rel="nofollow noreferrer">https://blog.codinghorror.com/so-youd-like-to-send-some-email-through-code/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-19T21:08:46.503Z
Answers.Text: @Akbar 's email address was blocked by G Suite Gmail app because he used it to sign in to his Gmail account from Craft. Google evaluated the app as the app that doesn't meet their security standards.
Answers.UserDisplayName: Dominik Krulak
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-06T23:59:16.870Z
Answers.LastActivityDate: 2018-02-06T23:59:16.870Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>To use your G Suite Gmail (business Gmail) with Craft you need to do following.</p>
  
  <ol>
  <li>Admin Console > Security > Basic Settings > Go to settings to less secure apps</li>
  </ol>
  
  <p>Once you are there, check <em>"<strong>Enforce access to less secure apps for all users</strong>"</em> option. It will allow you to log in on Non-Google apps, like a third party mail client or a web application.</p>
  
  <ol start="2">
  <li>Admin Console > Apps > G Suite > Gmail > Advanced settings > Allow per-user outbound gateways</li>
  </ol>
  
  <p>And check <em>"<strong>Allow users to send mail through an external SMTP server when configuring a "from" address hosted outside your email domains</strong>"</em>.</p>
  
  <p>Allow some time to propagate changes for the last step. To do those changes you must be "Super Admin" or "Admin" with required permission.</p>
  
  <p>In Craft's control panel > Email > select SMTP protocol.
  Than follow this <a href="https://support.google.com/a/answer/9003945" rel="nofollow noreferrer">Google's answer</a>.</p>
  
  <p>To connect to Gmail server use settings from the
  "Step 2: Set up your mail client to access Gmail" > Other mail clients.</p>
  
  <p>If you followed both steps from the Google's answer you should now be able to send a test email.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-19T21:01:34.670Z
Answers.LastActivityDate: 2018-11-19T21:10:22.970Z
Answers.LastEditDate: 2018-11-19T21:10:22.970Z
Answers.UserDisplayName: Dominik Krulak
Answers.Body: <p>I had the same problems earlier. I now use Mailjet for SMTP purposes. They offer 6000 mails per month and all mails will be delivered. Also you can check per mail what happened? </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-09T06:19:05.927Z
Answers.LastActivityDate: 2018-03-09T06:19:05.927Z
Answers.UserDisplayName: Martijn La Feber
Body: <p>I have a question regarding how to set up Craft 3 RC8 to send e-mails through a corporate GMail account.</p>
  
  <ol>
  <li>My website's MX records are pointed at GMail through Cloudflare</li>
  <li>I tried setting this up when my website was on Craft 2.6. I set that up and my e-mail got blocked. I unblocked it through GSuite admin account and switched back to php.</li>
  <li>When sending through PHP mail, my e-mails get sent into spam.</li>
  </ol>
  
  <p>So I need help on whether how to get my e-mails sent through GMail without my account getting banned, or how to make the e-mails sent through PHP not go into spam.</p>
  
Tags: <craft3><emails>
Title: Setting up Craft's registration e-mails to be sent through GMail
ThreadText: # Setting up Craft's registration e-mails to be sent through GMail
  
  (Asked by: username_0 on 2018-02-06)
  
  I have a question regarding how to set up Craft 3 RC8 to send e-mails through a corporate GMail account.
  
  1. My website's MX records are pointed at GMail through Cloudflare
  2. I tried setting this up when my website was on Craft 2.6. I set that up and my e-mail got blocked. I unblocked it through GSuite admin account and switched back to php.
  3. When sending through PHP mail, my e-mails get sent into spam.
  
  So I need help on whether how to get my e-mails sent through GMail without my account getting banned, or how to make the e-mails sent through PHP not go into spam.
  
  **Tags:** craft3, emails
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2018-02-06. Score: 2
  
  I'm not sure how your email address got blocked, but Craft 3 uses the same SMTP `smtp.gmail.com` server and settings that Craft 2 uses when you choose to send email via "Gmail"
  
  <https://github.com/craftcms/cms/blob/develop/src/mail/transportadapters/Gmail.php#L91-L97>
  
  Sending email through PHPMail/sendmail is notoriously unreliable and I wouldn't recommend it on production.
  
  <https://craftcms.com/support/troubleshooting-email-errors#dealing-with-email-delivery-issues>
  
  And there are quite a few steps you can take to help ensure your email doesn't get treated as SPAM: <https://blog.codinghorror.com/so-youd-like-to-send-some-email-through-code/>
  
  > **Comments:**
  > **username_2**: @username_0 's email address was blocked by G Suite Gmail app because he used it to sign in to his Gmail account from Craft. Google evaluated the app as the app that doesn't meet their security standards.  
  
  ---
  
  ### Answer by username_2 on 2018-11-19. Score: 2
  
  To use your G Suite Gmail (business Gmail) with Craft you need to do following.
  
  1. Admin Console > Security > Basic Settings > Go to settings to less secure apps
  
  Once you are there, check *"**Enforce access to less secure apps for all users**"* option. It will allow you to log in on Non-Google apps, like a third party mail client or a web application.
  
  2. Admin Console > Apps > G Suite > Gmail > Advanced settings > Allow per-user outbound gateways
  
  And check *"**Allow users to send mail through an external SMTP server when configuring a "from" address hosted outside your email domains**"*.
  
  Allow some time to propagate changes for the last step. To do those changes you must be "Super Admin" or "Admin" with required permission.
  
  In Craft's control panel > Email > select SMTP protocol.
  Than follow this [Google's answer](https://support.google.com/a/answer/9003945).
  
  To connect to Gmail server use settings from the
  "Step 2: Set up your mail client to access Gmail" > Other mail clients.
  
  If you followed both steps from the Google's answer you should now be able to send a test email.
  
  
  ---
  
  ### Answer by username_3 on 2018-03-09. Score: 1
  
  I had the same problems earlier. I now use Mailjet for SMTP purposes. They offer 6000 mails per month and all mails will be delivered. Also you can check per mail what happened?
  
  
  ---
  
  