ActionMailer::InlinePreviewInterceptor

Implements a mailer preview interceptor that converts image tag src attributes that use inline cid: style urls to data: style urls so that they are visible when previewing an HTML email in a web browser.

This interceptor is enabled by default. To disable it, delete it from the ActionMailer::Base.preview_interceptors array:

ActionMailer::Base.preview_interceptors.delete(ActionMailer::InlinePreviewInterceptor)
Included Modules
  • Base64
Constants
PATTERN = /src=(?:"cid:[^"]+"|'cid:[^']+')/i