API16

JMailHelper/cleanSubject

< API16:JMailHelper

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description

Cleans any injected headers from the subject string.



Syntax

static cleanSubject($subject)
Parameter Name Default Value Description
$subject $subject E-Mail subject string.

Returns

string Cleaned E-Mail subject string.

Defined in

libraries/joomla/mail/helper.php

Importing

jimport( 'joomla.mail.helper' );

Source Body

public static function cleanSubject($subject)
{
        return preg_replace("/((From:|To:|Cc:|Bcc:|Content-type:) ([\S]+))/", "", $subject);
}



Examples

Code Examples


Advertisement