Use SMTP authentication with mailer?
pslobo opened this issue · 1 comments
pslobo commented
HI,
I'd like to know if it's possible (and if not, request that feature) to implement SMTP authentication when sending email with mailer.
Currently, we use Google Apps and unfortunately, when using unauthenticated SMTP, we can only send to gmail and google apps users and not groups.
Ideally it'd be something along the lines of:
{
"mailer": {
"mail_from": "sensu@example.com",
"mail_to": "group1@example.com",
"smtp_address": "smtp.example.org",
"smtp_password":"superstrongpassword",
"smtp_port": "465",
"smtp_domain": "example.org",
"template": "/optional/path/to/template.erb",
"subscriptions": {
"subscription_name": {
"mail_to": "group2@example.com"
}
}
}
}
pslobo commented
Nevermind... Figured it out. I was assuming that it would use mail_to as username. I was obviously missing a definition. For those searching, this is possible using:
{
"mailer": {
"mail_from": "sensu@example.com",
"mail_to": "group1@example.com",
"smtp_address": "smtp.example.org",
"smtp_username":"sensu@example.com",
"smtp_password":"superstrongpassword",
"smtp_port": "465",
"smtp_domain": "example.org",
"template": "/optional/path/to/template.erb",
"subscriptions": {
"subscription_name": {
"mail_to": "group2@example.com"
}
}
}
}