ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Mail\Mime\Presentation\PlainTextMailBodyComposer Class Reference

Turns a mail body into plain text, for installations with HTML mails disabled and for the alternative part of a multipart mail. More...

+ Inheritance diagram for ILIAS\Mail\Mime\Presentation\PlainTextMailBodyComposer:
+ Collaboration diagram for ILIAS\Mail\Mime\Presentation\PlainTextMailBodyComposer:

Public Member Functions

 compose (MailBodySource $source)
 
 compose (MailBodySource $source)
 

Private Attributes

const array LINE_BREAKS = ['<br />', '<br>', '<br/>']
 

Detailed Description

Turns a mail body into plain text, for installations with HTML mails disabled and for the alternative part of a multipart mail.

Definition at line 29 of file PlainTextMailBodyComposer.php.

Member Function Documentation

◆ compose()

ILIAS\Mail\Mime\Presentation\PlainTextMailBodyComposer::compose ( MailBodySource  $source)

Implements ILIAS\Mail\Mime\Presentation\MailBodyComposer.

Definition at line 34 of file PlainTextMailBodyComposer.php.

34 : ComposedMailBody
35 {
36 $without_breaks = str_ireplace(self::LINE_BREAKS, "\n", $source->raw());
37 $plain_text = html_entity_decode(strip_tags($without_breaks), ENT_QUOTES);
38
39 return new ComposedMailBody($plain_text, null, InlineImages::none());
40 }

References ILIAS\Mail\Mime\Presentation\Asset\InlineImages\none(), and ILIAS\Mail\Mime\Presentation\MailBodySource\raw().

+ Here is the call graph for this function:

Field Documentation

◆ LINE_BREAKS

const array ILIAS\Mail\Mime\Presentation\PlainTextMailBodyComposer::LINE_BREAKS = ['<br />', '<br>', '<br/>']
private

Definition at line 32 of file PlainTextMailBodyComposer.php.


The documentation for this class was generated from the following file: