IntermediateEmail.write_preview_email
='preview_email.html') IntermediateEmail.write_preview_email(out_file
Write a preview HTML file with inline attachments embedded.
This method replaces image sources in the HTML with base64-encoded data from inline attachments, allowing you to preview the email as it would appear to recipients.
Parameters
out_file : str = 'preview_email.html'
-
The file path to write the preview HTML. Defaults to “preview_email.html”.
Returns
: None
Examples
"preview.html") email.write_preview_email(
Notes
Raises ValueError if external attachments are present, as preview does not support them.