/functions/compose.php

Description

compose.php

Functions for message compositon: writing a message, attaching files etc.

Functions
sq_get_attach_tempfile (line 24)

Get a new file to write an attachment to.

This function makes sure it doesn't overwrite other attachments, preventing collisions and race conditions.

  • return: of the tempfile only (not full path)
  • since: 1.5.2
filename sq_get_attach_tempfile ()
sq_send_mail (line 93)

Send a simple mail message using SquirrelMail's API.

Until SquirrelMail is sufficiently redesigned, this function is a stand-in for a simple mail delivery call. Currently, it only sends plaintext messages (unless the caller uses the $message parameter).

  • return: A two-element array, the first element being a boolean value indicating if the message was successfully sent or not, and the second element being the message's assigned Message-ID, if available (only available as of SquirrelMail 1.4.14 and 1.5.2)
array sq_send_mail (string $to, string $subject, string $body, string $from, [string $cc = ''], [string $bcc = ''], [object $message = ''])
  • string $to: The destination recipient.
  • string $subject: The message subject.
  • string $body: The message body.
  • string $from: The sender.
  • string $cc: The destination carbon-copy recipient. (OPTIONAL; default no Cc:)
  • string $bcc: The destination blind carbon-copy recipient. (OPTIONAL; default no Bcc:)
  • object $message: If the caller wants to construct a more complicated message themselves and pass it here, this function will take care of the rest - handing it over to SMTP or Sendmail. If this parameter is non- empty, all other parameters are ignored. (OPTIONAL: default is empty)

Documentation generated on Tue, 21 Oct 2014 04:17:26 +0200 by phpDocumentor 1.4.3