Class: Bs_HtmlMime
Source Location: /core/net/email/Bs_HtmlMime.class.php
Bs_Object
|
--Bs_HtmlMime
Html/Mime class is used to send emails with html/text combinations and attachements.
Author(s):
Version:
- 4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:41 $
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Class Methods
constructor Bs_HtmlMime [line 138]
Bs_HtmlMime Bs_HtmlMime(
[mixed
$headers = ''])
|
|
Constructor. Constructor function. Sets the headers if supplied.
method add_attachment [line 381]
void add_attachment(
mixed
$file, [mixed
$name = ''], [mixed
$c_type = 'application/octet-stream'])
|
|
************************************* * Adds a file to the list of attachments. *************************************
method add_header [line 239]
************************************* * Function to set a header. Shouldn't * really be necessary as you could use * the constructor and send functions, * it's here nonetheless. Takes any number * of arguments, which can be either * strings or arrays full of strings. * this function is php4 only and will * return false otherwise. Will return * true upon finishing. *************************************
method add_html [line 347]
void add_html(
mixed
$html, mixed
$text, [mixed
$images_dir = NULL])
|
|
************************************* * Adds a html part to the mail. * Also replaces image names with * content-id's. *************************************
method add_html_image [line 367]
void add_html_image(
mixed
$file, [mixed
$name = ''], [mixed
$c_type = 'application/octet-stream'])
|
|
************************************* * Adds an image to the list of embedded * images. *************************************
method build_html [line 463]
void build_html(
mixed
$orig_boundary)
|
|
************************************* * Builds html part of email. *************************************
method build_html_image [line 506]
void build_html_image(
mixed
$i)
|
|
************************************* * Builds an embedded image part of an * html mail. *************************************
method build_message [line 564]
void build_message(
[mixed
$params = array()])
|
|
************************************* * Builds the multipart message from the * list ($this->_parts). $params is an * array of parameters that shape the building * of the message. Currently supported are: * * $params['html_encoding'] - The type of encoding to use on html. Valid options are * "7bit", "quoted-printable" or "base64" (all without quotes). * 7bit is EXPRESSLY NOT RECOMMENDED. Default is quoted-printable * $params['text_encoding'] - The type of encoding to use on plain text Valid options are * "7bit", "quoted-printable" or "base64" (all without quotes). * Default is 7bit * $params['text_wrap'] - The character count at which to wrap 7bit encoded data. By * default this is 998. *************************************
method build_part [line 523]
void build_part(
mixed
$input)
|
|
************************************* * Builds a single part of a multipart * message. *************************************
method find_html_images [line 311]
void find_html_images(
mixed
$images_dir)
|
|
************************************* * Function for extracting images from * html source. This function will look * through the html code supplied by add_html() * and find any file that ends in one of the * extensions defined in $obj->image_types. * If the file exists it will read it in and * embed it, (not an attachment). * * Function contributed by Dan Allen *************************************
method get_encoded_data [line 434]
void get_encoded_data(
mixed
$data, mixed
$encoding)
|
|
************************************* * Function to return encoded text/html * based upon the build params. Don't * like this function name :( *************************************
method get_file [line 288]
void get_file(
mixed
$filename)
|
|
************************************* * This function will read a file in * from a supplied filename and return * it. This can then be given as the first * argument of the the functions * add_html_image() or add_attachment(). *************************************
method get_mime [line 221]
************************************* * Accessor function to return the mime * class variable. Purely for debug. *************************************
method get_rfc822 [line 648]
void get_rfc822(
mixed
$to_name, mixed
$to_addr, mixed
$from_name, mixed
$from_addr, [mixed
$subject = ''], [mixed
$headers = ''])
|
|
************************************* * Use this method to return the email * in message/rfc822 format. Useful for * adding an email to another email as * an attachment. there's a commented * out example in example.php. * * string get_rfc822(string To name, * string To email, * string From name, * string From email, * [string Subject, * string Extra headers]) *************************************
method quoted_printable_encode [line 395]
void quoted_printable_encode(
mixed
$input, [mixed
$line_max = 76])
|
|
************************************* * Encodes text to quoted printable standard. * * Function contributed by Allan Hansen *************************************
method send [line 610]
void send(
mixed
$to_name, mixed
$to_addr, mixed
$from_name, mixed
$from_addr, [mixed
$subject = ''], [mixed
$headers = ''])
|
|
************************************* * Sends the mail. not recommended. use the smtp class. *************************************
method set_body [line 208]
void set_body(
[mixed
$text = ''])
|
|
************************************* * Accessor function to set the body text. * Body text is used if it's not an html * mail being sent. *************************************
method set_charset [line 262]
void set_charset(
[mixed
$charset = ''], [mixed
$raw = FALSE])
|
|
************************************* * Accessor function to set the content charset. * * Function contributed by "Matt" *************************************
|
|