SMTP not working (doesn't show up as service)

Hi,

I tried setting up the SMTP service for email notifications etc. but I just can’t get it to work.
Below is the current code I have in the config. I tried variations of that (as found in some threads) as well, but nothing has worked. I also tried gmail, without any luck.

The service never shows up as a notify.xxx service and therefore can’t be used.

Any ideas what might be the problem?

(I am not a developer and don’t have a lot of experience with coding. So far I got pretty much everything I needed running on HA, but this seemingly easy service just won’t work. Please excuse me if I’m overlooking something obvious.)

Thanks!

notify:
  - name: "email_gmx"
    platform: smtp
    server: "mail.gmx.net"
    port: 587
    timeout: 15
    sender: "***********@gmx.de"
    encryption: starttls
    username: "**************@gmx.de"
    password: "*************"
    recipient:
      - "*********@gmx.de"
    sender_name: "Home Assistant"

Check that your ISP isn’t blocking outgoing mail ports. Some do as spam prevention.

Besides what @tom_l said, first check the log for smtp errors.
You should at least be able to try to send a notification.

I also am having this exact problem, is there any resolution?

You need to send the mail to a different account not to yourself. GMX has disabled that since June 2022. Had the same issue ( notify not showing in services ). Once I set it up like this it worked again.

notify:
  - name: "mailgmx"
    platform: smtp
    server: mail.gmx.net
    port: 587
    timeout: 15
    sender: "*********@gmx.net"
    encryption: starttls
    username: **********@gmx.net
    password: ************
    #cannot be send to self
    recipient: "someuser@*********.net"
    sender_name: "Home Assistant Notifier"

But why does it not appear as a service in developer tools? Or it only appears when is working?

If the integration can’t contact the mail server the integration won’t be loaded. If the integration is not loaded the service won’t be available.

When you use Developer Tools/Services does it show in the drop down as Notifications: Send a notification with mailgmx_smtp?

The documentation tells you to look for a notify.xxxx but it actually shows up as above.

I had a recent problems setting up smtp with gmail. Errors were showing up in my log though. Do you see anything in your log?

To get it working, all I did was change the order of my commands to exactly match the documentation and switch to a different supported port and voila it started to work.

I hope you’re able to get this working. I know how frustrating it is.

1 Like

This worked! Thanks!!