Mail_Mime::Mail_Mime()

Mail_Mime::Mail_Mime() – creates a new instance

Synopsis

require_once 'Mail/mime.php';

Mail_mime Mail_mime ( mixed $params = array() )

Description

Creates a new instance of Mail_Mime

Parameter

array $params - An associative array of parameters. These parameters affect the way the message is built. Use Mail_Mime::setParam() to set them later.

  • $params['eol'] - Type of line end. Default is ""\r\n"".

  • $params['delay_file_io'] - Specifies if attachment files should be read immediately when adding them into message object or when building the message. Useful for big messages handling using saveMessage* functions. Default is "false".

  • $params['head_encoding'] - Type of encoding to use for the headers of the email. Default is "quoted-printable".

  • $params['text_encoding'] - Type of encoding to use for the plain text part of the email. Default is "quoted-printable".

  • $params['html_encoding'] - Type of encoding for the HTML part of the email. Default is "quoted-printable".

  • $params['head_charset'] - The character set to use for the headers. Default is "iso-8859-1".

  • $params['text_charset'] - The character set to use for the plain text part of the email. Default is "iso-8859-1".

  • $params['html_charset'] - The character set to use for the HTML part of the email. Default is "iso-8859-1".

Note

Normally, it is not necessary to set parameters. But, if you want to send the generated MIME message using Mail then you have to set eol to "\n".

For backward compatybility setting end of line string as constructor's first parameter is supported.

If you're working with big attachments, enabling 'delay_file_io' will provent from loading attachments into memory. Until you're not using getMessage* functions don't worry about PHP's memory limit.

Mail_Mime (Previous) add attachment (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.