Back to Joomla project (class list)

Class MailHelper - list of methods

Email helper class, provides static methods to perform various tasks relevant to the Joomla email routines.
Package: Joomla\CMS\Mail
Copyright: (C) 2007 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Mail/MailHelper.php
Project: Joomla

Method Summary

public static string
(mixed $value)

Cleans single line inputs.
Parameters
  • string $value String to be cleaned.
Returns
  • string Cleaned string.
Since
  • 1.7.0
Show source code of this method: cleanLine Source Code

public static string
(mixed $value)

Cleans multi-line inputs.
Parameters
  • string $value Multi-line string to be cleaned.
Returns
  • string Cleaned multi-line string.
Since
  • 1.7.0
Show source code of this method: cleanText Source Code

public static string
(mixed $body)

Cleans any injected headers from the email body.
Parameters
  • string $body email body string.
Returns
  • string Cleaned email body string.
Since
  • 1.7.0
Show source code of this method: cleanBody Source Code

public static string
(mixed $subject)

Cleans any injected headers from the subject string.
Parameters
  • string $subject email subject string.
Returns
  • string Cleaned email subject string.
Since
  • 1.7.0
Show source code of this method: cleanSubject Source Code

public static mixed
(mixed $address)

Verifies that an email address does not have any extra headers injected into it.
Parameters
  • string $address email address.
Returns
  • mixed email address string or boolean false if injected headers are present.
Since
  • 1.7.0
Show source code of this method: cleanAddress Source Code

public static bool
(mixed $email)

Verifies that the string is in a proper email address format.
Parameters
  • string $email String to be verified.
Returns
  • bool True if string has the correct format; false otherwise.
Since
  • 1.7.0
Show source code of this method: isEmailAddress Source Code

public static string
(mixed $content)

Convert relative (links, images sources) to absolute urls so that content is accessible in email
Parameters
  • string $content The content need to convert
Returns
  • string The converted content which the relative urls are converted to absolute urls
Since
  • 4.1.0
Show source code of this method: convertRelativeToAbsoluteUrls Source Code

private static void
(mixed $content)

Check the content after regular expression function call.
Parameters
  • string $content Content to be checked.
Returns
  • void
Since
  • 4.1.0
-
  • \RuntimeException If there is an error in previous regular expression function call.
Show source code of this method: checkContent Source Code

Tags Summary

Since
1.7.0