/***************************************
** Title.........: PGP/HTML Mime Mail class
** Version.......: 1.0
** Author........: James Moore <james@phpuk.org>
** Filename......: function.definitions.txt
** Last changed..: 17/04/00
** Notes.........: Based upon html_mime_mail.class
** by Richard Heyes <richard.heyes@heyes-computing.net>
** by Tobias Ratschiller <tobias@dnet.it>
** and Sascha Schumann <sascha@schumann.cx>.
***************************************/
Function definitions:
void html_mime_mail([string headers])
Constructor function.
- headers can be used to add extra headers to the email (except for From: ).
void add_key(Keyname)
Adds the recipient keyname to the list of people to encrypt the message too.
void add_encrypted_attachment(string file, [string name], [string c_type])
Adds an encrypted attachment
Void encrypt_body()
Encrypts the text body ($this->Body) I will implement this with HTML attachments soon
void add_html(string html, string text)
Makes the email html based.
- html is the html version of the body.
- text is the plain text version of the body.
void build_html(string orig_boundary)
Builds the html body of the email.
- orig_boundary is the first boundary marker.
void add_html_image(string file, [string name], [string c_type])
Adds an image to the list of embedded images.
- file should contain the image, (Eg. $file = fread(...)).
- name is the name of the image.
- c_type is the content type of the image.
void add_attachment(string file, [string name], [string c_type])
Adds a file to the list of attachments
- file should contain the attachment, (Eg. $file = fread(...)).
- name is the name of the file.
- c_type is the content type of the file.
void build_html_image(int i)
Adds one of the embedded images from the list to the email.
- i indicates the position in the images array.
string message_part build_part(int i)
Adds one of the attachments from the list to the email.
- i indicates the position in the attachments array.
void build_message(void)
Starts the building of the email.
void send(string to_name, string to_addr, string from_name, string from_addr, [string subject], [string headers])
Sends the email to the address given. Addresses will be given
this format:
- to_name is the name of the recipient. If unknown give a blank string.
- to_addr is the address of the recipient.
- from_name is the name of the sender. If unknown give a blank string.
- from_addr is the address of the sender.
- subject is the subject of the email.
- headers is for extra headers for the email.
|