I am using Mail Gem for sending email. I am trying to send .PNG files using inline image tag like below
record_stream << "<br /> <p>Jeff added an image today.</p>"
.concat( "<img src="pngImagePath" /> " )
mail = Mail.new do
from '[email protected]'
to '[email protected]'
subject "Automated Report
html_part do
body "<i>This is an automated email. All data in this email was generated automatically.</i>
#{record_stream}
"
end
end #### End of mailer
But when I check my gmail record_stream does not appear. Neither the string nor the images. I want to display both in email body. Any help will be greatly appreciated. Thanks
First thing, the Image Path should have an url link for the image and not a relative path (because the email doesn't has access to the image in your server).
You can try add the image directly in the html_part body to see if works
Hope this helps you