projectdiscovery / notify

Notify is a Go-based assistance package that enables you to stream the output of several tools (or read from a file) and publish it to a variety of supported platforms.
https://projectdiscovery.io
MIT License
1.32k stars 133 forks source link

smtp send mail faild #210

Open ltfafei opened 1 year ago

ltfafei commented 1 year ago

image

PoundXI commented 11 months ago

Same issue on v1.0.5:

[ERR] failed to send smtp notification for id: email : error getting SMTP client: error connecting to server: dial tcp IP_ADDR:25: connect: connection timed out

The problem is notify app trying to connect to port 25, which may not be correct.

To fix this, specify port in the smtp_server config. (It's not described in the README.md)

smtp:
  - id: email
    smtp_server: mail.example.com:465 << specify port here. eg., 465 or 587
    smtp_username: test@example.com
    smtp_password: password
    from_address: from@email.com
    smtp_cc:
      - to@email.com
    smtp_format: "{{data}}"
    subject: "Email subject"
    smtp_html: false
    smtp_disable_starttls: false