Loading config/schema/symfony_mailer.schema.yml +4 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,10 @@ symfony_mailer.email_adjuster_plugin.mailer_inline_css: type: mapping label: 'Inline CSS' symfony_mailer.email_adjuster_plugin.mailer_plain_only: type: mapping label: 'Plain text only' symfony_mailer.email_adjuster_plugin.mailer_url_to_absolute: type: mapping label: 'URL to absolute' Loading src/Plugin/EmailAdjuster/PlainOnlyEmailAdjuster.php 0 → 100644 +27 −0 Original line number Diff line number Diff line <?php namespace Drupal\symfony_mailer\Plugin\EmailAdjuster; use Drupal\symfony_mailer\Processor\EmailAdjusterBase; use Drupal\symfony_mailer\EmailInterface; /** * Defines the Plain text only Email Adjuster. * * @EmailAdjuster( * id = "mailer_plain_only", * label = @Translation("Plain text only"), * description = @Translation("Sends email as plain text only."), * weight = 810, * ) */ class PlainOnlyEmailAdjuster extends EmailAdjusterBase { /** * {@inheritdoc} */ public function postRender(EmailInterface $email) { $email->setHtmlBody(NULL); } } Loading
config/schema/symfony_mailer.schema.yml +4 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,10 @@ symfony_mailer.email_adjuster_plugin.mailer_inline_css: type: mapping label: 'Inline CSS' symfony_mailer.email_adjuster_plugin.mailer_plain_only: type: mapping label: 'Plain text only' symfony_mailer.email_adjuster_plugin.mailer_url_to_absolute: type: mapping label: 'URL to absolute' Loading
src/Plugin/EmailAdjuster/PlainOnlyEmailAdjuster.php 0 → 100644 +27 −0 Original line number Diff line number Diff line <?php namespace Drupal\symfony_mailer\Plugin\EmailAdjuster; use Drupal\symfony_mailer\Processor\EmailAdjusterBase; use Drupal\symfony_mailer\EmailInterface; /** * Defines the Plain text only Email Adjuster. * * @EmailAdjuster( * id = "mailer_plain_only", * label = @Translation("Plain text only"), * description = @Translation("Sends email as plain text only."), * weight = 810, * ) */ class PlainOnlyEmailAdjuster extends EmailAdjusterBase { /** * {@inheritdoc} */ public function postRender(EmailInterface $email) { $email->setHtmlBody(NULL); } }