Support absolute paths in setHTMLBody for automatic CID embedding
- bug fix / new feature? not sure
- BC break? yes
Currently, setHTMLBody in Nette\Mail supports a basePath for automatically embedding local images as CID attachments. Relative paths like img/logo.svg work correctly, but absolute paths starting with a slash (e.g. /img/logo.svg) are ignored and not embedded.
This PR updates the logic so that images referenced with a leading slash are correctly resolved relative to the provided basePath, allowing projects that use Webpack-generated assets (which always output to a fixed public folder with leading slashes) to work without breaking existing templates that rely on relative paths.
Here, basePath for mails is intended to represent the www folder of the application, making it clear that absolute paths are resolved relative to the web root.