TYPO3  7.6
Static Public Member Functions | List of all members
MailUtility Class Reference

Static Public Member Functions

static getSystemFrom ()
 
static getSystemFromName ()
 
static getSystemFromAddress ()
 
static breakLinesForEmail ($str, $newlineChar=LF, $lineWidth=76)
 

Detailed Description

Class to handle mail specific functionality

Definition at line 20 of file MailUtility.php.

Member Function Documentation

static breakLinesForEmail (   $str,
  $newlineChar = LF,
  $lineWidth = 76 
)
static

Breaks up a single line of text for emails Words - longer than $lineWidth - will not be split into parts

Parameters
string$strThe string to break up
string$newlineCharThe string to implode the broken lines with (default/typically
)
int$lineWidthThe line width
Returns
string Reformated text

Definition at line 110 of file MailUtility.php.

static getSystemFrom ( )
static

Gets a valid "from" for mail messages (email and name).

Ready to be passed to $mail->setFrom()

Returns
array key=Valid email address which can be used as sender, value=Valid name which can be used as a sender. NULL if no address is configured

Definition at line 29 of file MailUtility.php.

References elseif.

static getSystemFromAddress ( )
static

Creates a valid email address for the sender of mail messages.

Uses a fallback chain: $TYPO3_CONF_VARS['MAIL']['defaultMailFromAddress'] -> no-reply -> no-reply('n') -> no-re.nosp@m.ply@.nosp@m.examp.nosp@m.le.c.nosp@m.om

Ready to be passed to $mail->setFrom()

Returns
string An email address

Definition at line 71 of file MailUtility.php.

References $GLOBALS, GeneralUtility\isFirstPartOfStr(), and GeneralUtility\validEmail().

Referenced by MailPostProcessor\setFrom().

static getSystemFromName ( )
static

Creates a valid "from" name for mail messages.

As configured in Install Tool.

Returns
string The name (unquoted, unformatted). NULL if none is set

Definition at line 49 of file MailUtility.php.

References $GLOBALS.