# SMTP Profile using Gmail

**URL:** <https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461>\
**Category:** Ignition\
**Created:** [June 1, 2023, 6:05pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461 "2023-06-01T18:05:55Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathan\_Heck](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@Nathan\_Heck](https://forum.inductiveautomation.com/u/Nathan_Heck)\
**Post date:** [June 1, 2023, 6:05pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/1 "2023-06-01T18:05:55Z")

</div>

Hello,

I am trying to set up a SMTP profile on ignition. This would be for alarm notifications as well as the reporting module daily email. I'm receiving an error everytime I attempt to test send an email. Is this a common occurance with gmail?

-smtp.gmail.com.  
-port 465  
-SSL/TLS is connected,  
-username is email  
-password is password for email.

error message I am receiving is:  
com.sun.mail.util.MailConnectException: Couldn't connect to host, port: [smtp.gmail.com](http://smtp.gmail.com), 465; timeout 10000;  
nested exception is:  
java.net.UnknownHostException: [smtp.gmail.com](http://smtp.gmail.com)

any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [June 1, 2023, 6:13pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/2 "2023-06-01T18:13:16Z")

</div>

You forgot to include the error message. Hit the pencil edit icon.

---

<div class="post-metadata">

**Author:** ![shebang](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shebang/32/47979_2.png) [@shebang](https://forum.inductiveautomation.com/u/shebang)\
**Post date:** [June 1, 2023, 6:44pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/3 "2023-06-01T18:44:43Z")

</div>

> [@Nathan\_Heck](#):
>
> java.net.UnknownHostException: [smtp.gmail.com](http://smtp.gmail.com)

This looks like a DNS error, which would be a local network problem. But I think that's strange for a google domain to not resolve.

What might be more likely is port 465 is blocked. What happens if you use port 587 instead?

---

<div class="post-metadata">

**Author:** ![Nathan\_Heck](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@Nathan\_Heck](https://forum.inductiveautomation.com/u/Nathan_Heck)\
**Post date:** [June 1, 2023, 7:05pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/4 "2023-06-01T19:05:16Z")

</div>

If I do 587 I receive the same error message.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 1, 2023, 7:31pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/5 "2023-06-01T19:31:18Z")

</div>

Changing the port does nothing for whatever is wrong with your network that DNS lookup for `smtp.gmail.com` fails.

Do you have an IT department you can talk to?

---

<div class="post-metadata">

**Author:** ![Nathan\_Heck](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@Nathan\_Heck](https://forum.inductiveautomation.com/u/Nathan_Heck)\
**Post date:** [June 1, 2023, 7:32pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/6 "2023-06-01T19:32:25Z")

</div>

Yes sir I do, but they haven't been much help so far.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [June 1, 2023, 8:25pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/7 "2023-06-01T20:25:09Z")

</div>

Can you use your company's internal SMTP server? Often these don't require authentication for mail from inside the organisation.

Tip: set the 'from' address to something that will help IT find the source of the email in the event that it starts flooding the system due to a code error, or whatever. e.g., `engineering.ignition.gateway01@mycompany.com`.

---

<div class="post-metadata">

**Author:** ![Ryan\_Allen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_allen/32/47013_2.png) [@Ryan\_Allen](https://forum.inductiveautomation.com/u/Ryan_Allen)\
**Post date:** [June 1, 2023, 8:57pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/8 "2023-06-01T20:57:28Z")

</div>

Did you generate an app password? Can't use gmail server for this anymore without using an app password.

> [@Ignition 8.1.23 Email Notification with Gmail Connection Issue](https://forum.inductiveautomation.com/t/ignition-8-1-23-email-notification-with-gmail-connection-issue/68007/2):
>
> Enable 2FA on the Gmail account, and then create an app password. The app password that gets generated will be used with your email when setting up the notification profile. See the "Create & use App Passwords" section in this link:

Side note, i've had the best luck with port 465 for this

---

<div class="post-metadata">

**Author:** ![Nathan\_Heck](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@Nathan\_Heck](https://forum.inductiveautomation.com/u/Nathan_Heck)\
**Post date:** [June 3, 2023, 12:22pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/9 "2023-06-03T12:22:52Z")

</div>

So what I found out is that our company never set up a DNS server for the gateway. I had to use the IP for the [smtp.gmail.com](http://smtp.gmail.com) in order to get out. I did have to enable the app password. Thank you Ryan. I appreciate it. I am learning ignition, as I'm use to wonderware and Panelview. There is a learning curve for sure, but I like it so far.

---

<div class="post-metadata">

**Author:** ![Nathan\_Heck](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@Nathan\_Heck](https://forum.inductiveautomation.com/u/Nathan_Heck)\
**Post date:** [June 3, 2023, 12:23pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/10 "2023-06-03T12:23:49Z")

</div>

I had to use the IP address for the smtp profile. IT never had a DNS server set up. I'm not an IT person by trade, so it was a last resort to try for me. I don't know how to set up a DNS server on gateway either.

---

<div class="post-metadata">

**Author:** ![jesusaltamirano600](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@jesusaltamirano600](https://forum.inductiveautomation.com/u/jesusaltamirano600)\
**Post date:** [June 12, 2023, 9:15pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/11 "2023-06-12T21:15:57Z")

</div>

Excuse me, which IP are you talking about?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [June 13, 2023, 8:05am UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/12 "2023-06-13T08:05:43Z")

</div>

The IP address of the SMTP server.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 23, 2024, 11:36pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/14 "2024-01-23T23:36:40Z")

</div>

Either ask your IT department for the details or check what your company email client settings are pointing to.

---

<div class="post-metadata">

**Author:** ![Nathan\_Heck](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@Nathan\_Heck](https://forum.inductiveautomation.com/u/Nathan_Heck)\
**Post date:** [January 24, 2024, 2:10pm UTC](https://forum.inductiveautomation.com/t/smtp-profile-using-gmail/74461/15 "2024-01-24T14:10:00Z")

</div>

IP address of the gmail SMTP profile.
