Mail_Mime::get()

Mail_Mime::get() – build the message

Synopsis

require_once 'Mail/mime.php';

string &get ( array $param = null , resource $filename = null , boolean $skip_head = false )

Description

This function should be called once you have added the text/html/images/attachments. It builds the message and returns it. It does not send it. To send what this function returns (in conjunction with the headers() -function) you would need to use the Mail::send()-function

Parameter

  • array $param - An associative array of build parameters. See constructor parameters list.

  • resource $filename - Optional output file where to save the message instead of returning it.

  • boolean $skip_head - True if you want to return/save only the message without headers.

Return value

string - the body of the message

Note

This function can not be called statically.

For versions older than 1.6.0 Mail_Mime::get() has to be called before Mail_Mime::headers().

add image to message (Previous) build the header lines (Next)
Last updated: Fri, 24 Oct 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

Note by: justinasu@gmail.com
I noticed that get method does not encode the built message in the specified encoding.

if you set transfer encoding and html encoding the returned body is unencoded in say 7bit encoding.
Note by: kguest
this must be called before the headers() method