Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendGrid not working due to invalid send address #88

Open
kusold opened this issue Jan 17, 2019 · 1 comment
Open

SendGrid not working due to invalid send address #88

kusold opened this issue Jan 17, 2019 · 1 comment

Comments

@kusold
Copy link

kusold commented Jan 17, 2019

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']}>"

@ninthwalker
Copy link
Owner

Thanks for the report. Will look into updating it to work for sendgrid as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants