Approach 2.

Search the html, replace the URLs to files to be "local urls (no paths in the uls)" and then add the graphics to the email as attachments, which are referred to in the HTML message.


This is how to do it. All modern mail clients and MTAs understand MIME. The specific issue of referring to attachments by relative URLs is in RFC 2557.

Peter