Class: SendcloudMailer::Interceptor
- Inherits:
-
Object
- Object
- SendcloudMailer::Interceptor
- Defined in:
- lib/sendcloud-mailer/interceptor.rb
Class Method Summary collapse
Class Method Details
.delivering_email(mail) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/sendcloud-mailer/interceptor.rb', line 3 def self.delivering_email(mail) html = mail.html_part ? mail.html_part.body.decoded : nil return if html.nil? html = Nokogiri::HTML(html) body = html.xpath('//body')[0] body.name = 'div' mail.html_part.body = body.to_s end |