Save 36% for Black Friday! Learn more

New Discussion

Notifications

You’re not receiving notifications from this thread.

Attach image to summernote and send email

0
Rails

I recently implement email in my rails app. I'm using summernote to create email templates and save it. Everything works fine. I can upload image to the editor and save it to database. But when I send the email template, the image in the email that I'd received is broken. I didn't use any uploader to handle the image uploaded, the image was encoded in Base64, so how do I fix this?

My mailer.rb
def message_send(candidate_mail)

@candidate_mail = candidate_mail

mail(

  to: "#{@candidate_mail.to}",

  from: "#{@candidate_mail.from}",

  subject: "#{@candidate_mail.subject}",

  body: "#{@candidate_mail.body}",

  content_type:  "text/html",

  important: true,

  inline_css: true,


  )

end

Join the discussion
Create an account Log in