[ Index ]

PHP Cross Reference of MyBB 1.8.38

title

Body

[close]

/inc/ -> class_mailhandler.php (summary)

MyBB 1.8 Copyright 2014 MyBB Group, All Rights Reserved Website: http://www.mybb.com License: http://www.mybb.com/about/license

File Size: 441 lines (10 kb)
Included or required: 3 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

MailHandler:: (13 methods):
  get_from_email()
  build_message()
  set_charset()
  set_message()
  set_subject()
  set_to()
  set_plain_headers()
  set_html_headers()
  set_common_headers()
  fatal_error()
  cleanup()
  cleanup_crlf()
  utf8_encode()


Class: MailHandler  - X-Ref

Base mail handler class.
get_from_email()   X-Ref
Selects between AdminEmail and ReturnEmail, dependant on if ReturnEmail is filled.
return: string

build_message($to, $subject, $message, $from="", $charset="", $headers="", $format="text", $message_text="", $return_email="")   X-Ref
Builds the whole mail.
To be used by the different email classes later.

param: string $to to email.
param: string $subject subject of email.
param: string $message message of email.
param: string $from from email.
param: string $charset charset of email.
param: string $headers headers of email.
param: string $format format of the email (HTML, plain text, or both?).
param: string $message_text plain text version of the email.
param: string $return_email the return email address.

set_charset($charset)   X-Ref
Sets the charset.
param: string $charset charset

set_message($message, $message_text="")   X-Ref
Sets and formats the email message.
param: string $message message
param: string $message_text

set_subject($subject)   X-Ref
Sets and formats the email subject.
param: string $subject

set_to($to)   X-Ref
Sets and formats the recipient address.
param: string $to

set_plain_headers()   X-Ref
Sets the plain headers, text/plain

set_html_headers($message, $message_text="")   X-Ref
Sets the alternative headers, text/html and text/plain.
param: string $message
param: string $message_text

set_common_headers()   X-Ref
Sets the common headers.

fatal_error($error)   X-Ref
Log a fatal error message to the database.
param: string $error The error message

cleanup($string)   X-Ref
Rids pesky characters from subjects, recipients, from addresses etc (prevents mail injection too)
return: string The cleaned string
param: string $string The string being checked

cleanup_crlf($text)   X-Ref
Converts message text to suit the correct delimiter
See dev.mybb.com/issues/1735 (Jorge Oliveira)

return: string The converted string
param: string $text The text being converted

utf8_encode($string)   X-Ref
Encode a string based on the character set enabled. Used to encode subjects
and recipients in email messages going out so that they show up correctly
in email clients.

return: string The encoded string.
param: string $string The string to be encoded.



2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref