-
Notifications
You must be signed in to change notification settings - Fork 87
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_actionmailer_settings => options #58
Comments
@joshm1204, those appear to be the only two options available. This gem utilizes the send-grid ruby gem which makes use of the Sendgrid v3 Mail Api. I see no reference to setting a 'domain' there. But the sender domain is referenced in the 'from' and 'reply-to'? Is that what you are looking for? |
@tyrauber I assume @joshm1204 means setting the |
@ur5us Thanks for the clarification. sendgrid-actionmailer currently only passes the api_key to sendgrid-ruby, but as you suggest there are additional attributes that can be set through sendgrid-ruby API initialization, specifically api_key, host, request_headers, version, and impersonate_subuser. It would take a little bit of refactoring, but this gem could pass a settings hash to SendGrid::Api.new instead of just an api_key. The only major caveat is it would also need to take into account merging in instance set settings - mail_settings passed to mail that overwrite the default initializer settings. What purpose or functionality would these additional attributes provide? |
@tyrauber There are multiple purposes I think but one specific is this: https://github.com/TimKaechele/PostDoc Currently, it’s not possible to use PostDoc as a custom host can’t be configured. |
@ur5us Give the branch feature/sendgrid_api_settings a try.
It should enable you to globally pass api_key and host ( or the other SendGridApi client settings) to sendgrid_actionmailer_settings:
or the mail instance through delivery-method-options: mail(to: '[email protected]',
subject: 'email subject',
body: 'email body',
delivery_method_options: {
api_key: 'SENDGRID_API_KEY',
host: 'SENDGRID_HOST'
}
) |
What are the options you can set for sendgrid_actionmailer_settings? e.g. can you set the 'domain'?
The text was updated successfully, but these errors were encountered: