[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/mail/ -> UserMailer.php (summary)

Classes used to send e-mails This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Author: <[email protected]>
Author: <[email protected]>
Author: Tim Starling
Author: Luke Welling [email protected]
File Size: 425 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

UserMailer:: (9 methods):
  sendWithPear()
  arrayToHeaderString()
  makeMsgId()
  send()
  errorHandler()
  sanitizeHeaderValue()
  rfc822Phrase()
  quotedPrintable()
  quotedPrintableCallback()


Class: UserMailer  - X-Ref

Collection of static functions for sending mail

sendWithPear( $mailer, $dest, $headers, $body )   X-Ref
Send mail using a PEAR mailer

param: UserMailer $mailer
param: string $dest
param: string $headers
param: string $body
return: Status

arrayToHeaderString( $headers, $endl = "\n" )   X-Ref
Creates a single string from an associative array

param: array $headers Associative Array: keys are header field names,
param: string $endl The end of line character.  Defaults to "\n"
return: string

makeMsgId()   X-Ref
Create a value suitable for the MessageId Header

return: string

send( $to, $from, $subject, $body, $replyto = null,$contentType = 'text/plain; charset=UTF-8')   X-Ref
This function will perform a direct (authenticated) login to
a SMTP Server to use for mail relaying if 'wgSMTP' specifies an
array of parameters. It requires PEAR:Mail to do that.
Otherwise it just uses the standard PHP 'mail' function.

param: MailAddress|MailAddress[] $to Recipient's email (or an array of them)
param: MailAddress $from Sender's email
param: string $subject Email's subject.
param: string $body Email's text or Array of two strings to be the text and html bodies
param: MailAddress $replyto Optional reply-to email (default: null).
param: string $contentType Optional custom Content-Type (default: text/plain; charset=UTF-8)
return: Status

errorHandler( $code, $string )   X-Ref
Set the mail error message in self::$mErrorString

param: int $code Error number
param: string $string Error message

sanitizeHeaderValue( $val )   X-Ref
Strips bad characters from a header value to prevent PHP mail header injection attacks

param: string $val String to be santizied
return: string

rfc822Phrase( $phrase )   X-Ref
Converts a string into a valid RFC 822 "phrase", such as is used for the sender name

param: string $phrase
return: string

quotedPrintable( $string, $charset = '' )   X-Ref
Converts a string into quoted-printable format

param: string $string
param: string $charset
return: string

quotedPrintableCallback( $matches )   X-Ref
No description



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1