Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
mail-embed-html-images
Advanced tools
Extends Mail to provide a mechanism for converting external image sources to embedded attachments.
require 'mail'
require 'mail/embed-html-images'
mail = Mail.new do
from 'sender@example.com'
to 'recipient@example.com''
subject 'This is a test email'
html_part File.read('body.html')
end
mail.embed_html_images
mail.deliver
The embed_html_images
method looks for image tags with http[s] sources,
downloads the image from the src attribute, adds it as an attachment, and
replaces the original src attribute with a cid reference to the attachment.
It keeps track of downloaded files so if you have two images with the same source it will only download and attach tha image once and ref the same attachment from both images.
If you change the html_part, then you will need to re-run
embed_html_images
. This will download any new images found, and remove
any attached images which are no longer required.
That is all.
FAQs
Unknown package
We found that mail-embed-html-images demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.