Sending mail results in "java.lang.NullPointerException" message

Graylog cannot send email, although it can be sent via the cli.

  • OS Information: Ubuntu 20.04
  • Graylog: 4.2.1 (3 nodes)

Mail can be sent via the cli with no issue. Testing an email notification results in the follow message in system → overview:

The Graylog server encountered an error while trying to send an email. This is the detailed error message: java.lang.NullPointerException

I cannot find any other occurrence of any related message in the logs, any idea on what the problem may be ?

many thanks



Did you configure your GL server.conf for mail?

transport_email_enabled = true
transport_email_hostname = localhost
tansport_email_port = 25
transport_email_subject_prefix = [graylog]
transport_email_from_email =
transport_email_web_interface_url =

Thanks Gsmith, the settings we have are:

Email transport

transport_email_enabled = true
transport_email_hostname =
transport_email_port = 25
transport_email_use_tls = true
transport_email_use_ssl = false

Does it require the prefix, from email and interface url as well?

many thanks

Ok, adding those extra field has changed the error:

Error: Notification has email recipients and is triggered, but sending emails failed. Sending the email to the following server failed :

Is this a dedicated email server? or is this from your localhost?

Not that I know of. I did have to use transport_email_web_interface_url = which was my GL server IP Address. It been a long time ago since I configured this

Thanks for your help, in the end it was using the wrong mail server.

many thanks


:laughing: I have don that also in the past. Glad you fixed it and thanks for posting your fix.


Mark the answer for future searches!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.