[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/inc/ -> class.mail.php (sommaire)

(pas de description)

Poids: 216 lignes (8 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Plume_Mail:: (7 méthodes):
  Plume_Mail()
  addMessage()
  addAttachment()
  buildMessage()
  getMessage()
  sendMail()
  quoted_printable_encode()


Classe: Plume_Mail  - X-Ref

Generate multipart emails.

Class to easily generate multipart emails. It supports embedded
images within the email. It can be used to send both a text version
and the HTML equivalent version of a message.

The encoding of the message is utf-8 by default.

Usage example:
<code>
$email = new Plume_Mail('from_email@example.com', 'to_email@example.com',
'Subject of the message');
$img_id = $email->addAttachment('/var/www/html/img/pic.jpg', 'image/jpg');
$email->addMessage('<html><head></head><body>'."\n"
.'This is text before <img src="cid:'.$img_id.'"> and after.'."\n"
.'</body></html>',
'text/html');
$email->sendMail();
</code>

Plume_Mail($src, $dest, $subject, $encoding='utf-8')   X-Ref
Construct the base email.

FIXME: To provide a document as text and an alternative as
HTML, the content type should be multipart/alternative with one
plain/text and one HTML document. An option somewhere should
enable this option.

param: string The email of the sender.
param: string The destination email.
param: string The subject of the message.
param: string Encoding of the message ('utf-8)

addMessage($msg='', $ctype='text/plain')   X-Ref
Add the base plain text message to the email.

param: string The message
param: string The mime-type ('text/plain;')

addAttachment($file, $ctype)   X-Ref
Add an attachment to the message.

The file to attach must be available on disk and you need to
provide the mimetype of the attachment manually.

The id of the attachment can be used for embedding images in
HTML emails. Avoid abusing the use of them or your emails will
be flagged as spam.

param: string Path to the file to be added.
param: string Mimetype of the file to be added.
return: string The id of the attachment.

buildMessage()   X-Ref
Generate the message.


getMessage()   X-Ref
Get the message body as a string.

return: string Message body

sendMail()   X-Ref
Effectively sends the email.


quoted_printable_encode($text)   X-Ref
Will be used when allowing additional headers.

http://www.php.net/manual/en/function.imap-8bit.php



Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics