jhuckaby / Cronicle

A simple, distributed task scheduler and runner with a web based UI.
http://cronicle.net
Other
3.51k stars 372 forks source link

Problem getting smtp with auth #295

Open casey1701 opened 4 years ago

casey1701 commented 4 years ago

Here's a bit of my config file. I can't get the server to start with the mail_options stuff in there. Where do I put mail_options? I'd just like to use sendgrid's smtp server. If I take out the whole mail_options part it works, but I get an authentication error from sendgrid (since I'm not supplying any login details).

{ "base_app_url": "http://myapp.com:3012", "email_from": "collector@myapp.com", "smtp_hostname": "smtp.sendgrid.net", "smtp_port": 25, "mail_options": { "secure", true, "auth": { user: "apikey", pass: "SG.mBpatWqNT6GXNQ0WUZPOGg.kgiPJv-CWrIJRmXXXXXXXXXXXXXXXXXXXXXXX" } },

    "secret_key": "77bd6XXXXXXXXXXXXXXb",
    "log_dir": "logs",
    "log_filename": "[component].log",
    "log_columns": ["hires_epoch", "date", "hostname", "pid", "component", "category", "code", "msg", "data"],
    "log_archive_path": "logs/archives/[yyyy]/[mm]/[dd]/[filename]-[yyyy]-[mm]-[dd].log.gz",
    "log_crashes": true,
    "copy_job_logs_to": "",
    "queue_dir": "queue",
    "pid_file": "logs/cronicled.pid",
strelexx commented 3 years ago

Try this instead: { "base_app_url": "http://myapp.com:3012", "email_from": "collector@myapp.com", "smtp_hostname": "smtp.sendgrid.net", "smtp_port": 25, "mail_options": { "secure": true, "auth": { "user": "apikey", "pass": "SG.mBpatWqNT6GXNQ0WUZPOGg.kgiPJv-CWrIJRmXXXXXXXXXXXXXXXXXXXXXXX" } },