Skip to content

SendGrid not working due to invalid send address #88

@kusold

Description

@kusold

I'm trying to use SendGrid to send reports, but I'm experiencing an error:

An SMTP From address is required to send a message. Set the message smtp_envelope_from, return_path, sender, or from address.["/usr/lib/ruby/gems/2.3.0/gems/mail-2.6.3/lib/mail/check_delivery_params.rb:5:in `check_delivery_params'", "/usr/lib/ruby/gems/2.3.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:98:in `deliver!'", "/usr/lib/ruby/gems/2.3.0/gems/mail-2.6.3/lib/mail/message.rb:252:in `deliver!'", "/var/lib/nowshowing/mailReport.rb:99:in `sendMail'", "/usr/local/sbin/combinedreport:452:in `main'", "/usr/local/sbin/combinedreport:460:in `

I believe it is because SendGrid uses the username apikey for their SMTP server and then requires you to provide an address to send from.

I believe this line is causing the issue:

from "#{$advanced['mail']['from']} <#{$advanced['mail']['username']}>"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions