Banshee
the secure PHP framework

E-mail library

Methods

  • __construct($subject, $from_address = null, $from_name = null):
    Create a new e-mail object.
  • reply_to($address, $name = null):
    Set the Reply-to SMTP header.
  • to($address, $name = null):
    Set the To SMTP header.
  • to_user_id($db, $user_id):
    Extract To-information from the database and use it in the e-mail.
  • cc($address, $name = null):
    Set the CC SMTP header.
  • bcc($address, $name = null):
    Set the BCC SMTP header.
  • message($message):
    Set the e-mail content. If the message is within a HTML or BODY tag, the e-mail is send as a HTML message.
  • add_attachment($filename, $content = null, $content_type = null):
    Add an inline attachment to the e-mail.
  • send($to_address = null, $to_name = null):
    Send the e-mail to the supplied address.

Example

[php] message("This is my message to you"); $mail->send("bob@example.com", "Bob"); ?> [/php]