Closed ghost closed 7 years ago
I'm a Digdag user (not a developer). I tested send mail in my environment.
I can send e-mail via smtp.gmail.com
with the following step.
digdag server.
digdag run
support mail
operator with SMTP auth.digdag secret
does not support local mode.digdag run
too. (Please see below).http://www.digdag.io/operators.html#mail-sending-email
I choose b) in this case.
First, create server.conf
.
server.bind = xxx.xxx.xx.xxx # server IP ADDRESS
#
digdag.secret-encryption-key = dGVzdDEyMzR0ZXN0MTIzNA==
You an create your secret with the following command
echo -n "test1234test1234" | openssl base64
The secret must be 16 characters (128byte).
digdag server -c server.conf -m
This is the on-memory server. Please use test only.
.
|-- body.txt
|-- client.conf
`-- test_mail.dig
client.http.endpoint = http://address:port
_export:
mail:
host: smtp.gmail.com
from: your_gmail_address
port: 587
tls: true
debug: true
username: "your_gmail_address"
timezone: "Asia/Tokyo"
schedule:
minutes_interval>: 5
+task1:
mail>: body.txt
to: [destination_address]
subject: "digdag test"
digdag push test_mail -c client
digdag secret --project test_mail --set mail.password -c client.conf
One more thing.
mail.password: PASSWORD
on latest version(v0.8.17).
Unsecure 'password' parameter is deprecated.
digdag secret
feature. You can send e-mail using digdag run
with the following configuration.
Please try it.
http://www.digdag.io/operators.html#mail-sending-email
~/.config/digdag/config
secrets.mail.password = your password
timezone: UTC
+mail:
mail>: body.txt
subject: digdag test local mode
from: your_gmail_address
to: [destination]
username: "your_gmail_address"
host: smtp.gmail.com
port: 587
digdag run mail
It went well after changing to secrets.mail.password. Thanks!
I want to use Google Apps's SMPT server for sending mails. For this i have an own domain and it is hosted with Google Apps e.g.: example.com When using now a user with the right password and a username like admin@example.com, the sending fails with Google Apps reporting an Authentication Error with username or password wrong.
This was tested with: 1)mail.dig _export: mail.host: smtp.gmail.com mail.port: 587 mail.from: admin@example.com mail.username: admin@example.com mail.password: PASSWORD mail.debug: true +digdag: mail>: mail.txt subject: test mail to: admin@example.com
2.) digdag run mail.dig Here on debug the error was given:
DEBUG SMTP: protocolConnect login, host=smtp.gmail.com, user=admin@example.com, password=
DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM XOAUTH2
DEBUG SMTP: Using mechanism LOGIN
DEBUG SMTP: AUTH LOGIN command trace suppressed
DEBUG SMTP: AUTH LOGIN failed