webhookd icon indicating copy to clipboard operation
webhookd copied to clipboard

Can't send an e-mail through gmail SMTP

Open eoprede opened this issue 1 year ago • 0 comments
trafficstars

Hello, I'm trying to use the docker container and send e-mails from it via google's smtp. Something doesn't work and I can't quite figure out why, as the logs are non-descriptive:

time=2024-01-01T17:15:40.406Z level=INFO source=/go/src/github.com/ncarlier/webhookd/pkg/hook/job.go:101 msg="hook executed" hook=test2 id=1 status=success took=27201
time=2024-01-01T17:15:50.504Z level=ERROR source=/go/src/github.com/ncarlier/webhookd/pkg/notification/notifier.go:20 msg="unable to send notification" webhook=test2 id=1 err=EOF

The container is configured via ENV, here are the settings:

            - name: WHD_NOTIFICATION_URI
              value: "mailto:[email protected]?smtp=smtp.gmail.com:465&[email protected]&password=smpt_password&conn=tls-insecure&[email protected]"
            - name:  WHD_LOG_LEVEL
              value: debug
            - name: WHD_LOG_HOOK_OUTPUT
              value: "true"

The script is extremely basic:

#!/bin/bash

echo "notify: Hello World"

I can just install mailx or something similar and use shell script to send an e-mail, but ideally I would like to just keep using the native container.

Any suggestions on how to fix it or how to enable more logs? Thanks!

eoprede avatar Jan 01 '24 18:01 eoprede