Skip to main content
Question

How to use GMAIL as SMTP server (the right way)

  • Dec 18, 2019 11:33 AM UTC
  • 15 replies
  • 236 views

Forum|alt.badge.img+2

Hi everybody,

would like to share this short guide to help other users out using gmail as official server to send email.
it works in both cases with @gmail.com domain and google managed one @MY13_2_domain.tld

CONFIGURATION

Server and Port: smtp.gmail.com : 587
Encryption: TLSv1.2
Connection timeout: 30 sec
Sender Display name: JAMF Software Server
Sender email address: ______@XXXX //your domain, gmail o gmail-managed
Username: _______@XXXX //your domain, gmail o gmail-managed

check AUTHENTICATED CONNECTION.
use same email and password we used for the SMTP account.

IMPORTANT NOTE:
Less secure app option should be turned at ACCOUNT LEVEL, not at organization one. as a console admnistrator I wasted hours debugging this issue and realized just now that the option must be on at account level, not at organization one.

Less secure apps & your Google Account

hope this will help!

brgds.
Arkage.

15 replies

Forum|alt.badge.img+13
  • Contributor
  • Dec 18, 2019 12:37 PM UTC

I ran into this recently as well. Thanks for the write up.

One thing to note is that Google allows 2000 messages a day using this method. Depending on how many notifications you have and how big your organization is it could hit that. Google SMTP Settings


Forum|alt.badge.img+1
  • New Contributor
  • May 5, 2020 5:43 PM UTC

until gmail disables that "feature"
I prefer to use the smtp-relay.gmail.com service for stuff like this, as it has a 10,000/day limit but can't get a lock on all the possible outbound IPs jamfcloud uses.


macbrun
Forum|alt.badge.img+7
  • Contributor
  • Jun 29, 2020 12:21 PM UTC

Thank you @Arkage! This worked perfectly.


Forum|alt.badge.img
  • New Contributor
  • Sep 17, 2020 12:50 AM UTC

Thanks Arkage. Once I enabled less secure option on my gmail account, the test email works!


Forum|alt.badge.img+2
  • New Contributor
  • Sep 17, 2020 7:46 PM UTC

Thanks @Arkage , this helped me set it up quick.


Forum|alt.badge.img

This is still not allowing to send. Thank you and i will update on our solution.


Forum|alt.badge.img

You can (and should) do this without enabling less secure apps. Create an app-specific password for the user and use that instead: https://myaccount.google.com/apppasswords

Accounts that have 2FA turned on are not allowed to enable less secure apps anyway.


Forum|alt.badge.img
  • New Contributor
  • Jan 5, 2021 5:44 PM UTC

Thanks a million, Arkage, you saved my day!


Forum|alt.badge.img+8
  • Valued Contributor
  • Mar 16, 2021 9:59 PM UTC

I configured my smtp server as suggested in this post but it fails the test each time. Any tips on troubleshooting?


atomczynski11
Forum|alt.badge.img+19

@Morningside

Try the following settings

Port: 465
Encryption Type: SSL
Connection Timeout: 5 Seconds

Requires Authentication is checked.

You are using an actual account username and password, are you able to sign in to the account itself (not using Jamf)?


Forum|alt.badge.img+6
  • Contributor
  • Oct 6, 2022 5:22 PM UTC

Just a heads up, this option has been depreciated and you're no longer able to enable the less secure option.


Forum|alt.badge.img+1
  • New Contributor
  • Dec 20, 2022 5:58 PM UTC

So without being able to enable less secure apps is there no way to have Gmail as an SMTP server in Jamf?


Forum|alt.badge.img+1
  • New Contributor
  • Dec 20, 2022 6:24 PM UTC

kevinv
Forum|alt.badge.img+3
  • New Contributor
  • Jul 19, 2023 6:52 PM UTC

We followed the HCSOnline guide without issue. Just noticed it broke last week. No changes to the service account being used. Going to try deleting and re-creating the app password to see if that resolves it. Curious if anyone can speculate why this may have happened.


Darnell_Bartee
Forum|alt.badge.img

This was what got it working for us:

https://hcsonline.com/images/PDFs/Jamf_Google_App_Password.pdf 


Thank you! This was also my fix I did skip the first half with setting up LSA.