Next Previous Contents

3. Email send engine

3.1 Thoughts.

The email sending engine for the Action Application is needed not only for the email subscription service, but also for a possible future event notification service.

Features of a email send function or engine would need to include these features:

php already has a mail() function which, assuming php is installed correctly, allows to send email. The function creates only very simple email. Arguments are a subject line, a list of receivers, the message body and, optionally, additional header lines. Header lines of any flavor can be added to the outgoing email using that argument. Thus, the function is sufficient for use in the mail engine.

The specified aamail() function (see aamail ) wraps around the mail() function to extend its capabilities with the needed features.

3.2 Specification detail

File: include/email.php3

Function: aamail()

The function sends an email. It encodes the text to quoted-printable if necessary. Also, the subject line is encoded if necessary.

Arguments:
  string $dest[]        - destination email addresses
  string $subject       - subject line, unencoded
  string $sender        - sender address (envelope sender of email, used for
                                error messages)
  string $text          - unencoded message text
  string $charset       - flag indicating charset to use. This value
                                is put into the "Content-Type:" header line
Return value:
  true if the message could be sent, false otherwise.
Hints: php functions imap_8bit(), imap_qprint()


Next Previous Contents