Skip to main content
Question

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

  • December 18, 2019
  • 15 replies
  • 50 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
  • 43 replies
  • December 18, 2019

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
  • 9 replies
  • May 5, 2020

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
  • 22 replies
  • June 29, 2020

Thank you @Arkage! This worked perfectly.


Forum|alt.badge.img
  • New Contributor
  • 1 reply
  • September 17, 2020

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


Forum|alt.badge.img+2
  • New Contributor
  • 4 replies
  • September 17, 2020

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


Forum|alt.badge.img
  • New Contributor
  • 1 reply
  • November 1, 2020

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


Forum|alt.badge.img
  • New Contributor
  • 1 reply
  • December 3, 2020

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
  • 1 reply
  • January 5, 2021

Thanks a million, Arkage, you saved my day!


Forum|alt.badge.img+8
  • Valued Contributor
  • 79 replies
  • March 16, 2021

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+18
  • Jamf Heroes
  • 312 replies
  • March 25, 2021

@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+5
  • Contributor
  • 10 replies
  • October 6, 2022

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
  • 2 replies
  • December 20, 2022

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
  • 2 replies
  • December 20, 2022

kevinv
Forum|alt.badge.img+2
  • New Contributor
  • 12 replies
  • July 19, 2023

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
  • New Contributor
  • 1 reply
  • January 31, 2024

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.