IntermediateEmail.write_preview_email

IntermediateEmail.write_preview_email(out_file='preview_email.html')

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

email.write_preview_email("preview.html")

Notes

Raises ValueError if external attachments are present, as preview does not support them.