My rails app uses sendgrid to send emails. I wanted to know if there was anyway for all the emails to use a common layout. I tried setting the layout in the notifications controller but the layout was not being applied to the emails.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think this is specific to SendGrid. If you are using their SMTP interface then you don’t need to do anything additional over sending a normal email in Rails.
To use layouts in emails you specify the layout in a very similar fashion to a normal controller. This guide should help. Importantly note: