NowShowing
NowShowing copied to clipboard
SendGrid not working due to invalid send address
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: https://github.com/ninthwalker/NowShowing/blob/896579a3304171cde0888cb39cde9c6f7ed67f05/root/var/lib/nowshowing/mailReport.rb#L92
Thanks for the report. Will look into updating it to work for sendgrid as well.