Attach image to summernote and send email
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