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.
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:
The layout name needs to be the same as your mailer, such as user_mailer.html.erb and user_mailer.text.erb to be automatically recognized by your mailer as a layout.
Try to follow these precautions of sendgrid http://support.sendgrid.com/entries/21699742-HTML-Formatting-Issues may be it resolve your issue, otherwise its very simple to make a layout for all emails, for this you just have to mention layout in mailer class.