/**
  * Adds the part $part to the list of multipart messages.
  *
  * This method is called automatically by ezcMailMultipartParser
  * each time a part is parsed.
  *
  * @param ezcMailPart $part
  */
 public function partDone(ezcMailPart $part)
 {
     $this->part->appendPart($part);
 }
Beispiel #2
0
<?php

require_once '/home/dotxp/dev/PHP/zetacomponents/trunk/Base/src/ezc_bootstrap.php';
$imapOptions = new ezcMailImapTransportOptions();
$imapOptions->ssl = true;
$imap = new ezcMailImapTransport('example.com', 993, $imapOptions);
$imap->authenticate('*****@*****.**', 'foo23bar');
$imap->selectMailbox('Inbox');
$mailSet = $imap->fetchAll();
$parser = new ezcMailParser();
$retMails = $parser->parseMail($mailSet);
$mail = new ezcMail();
$mail->from = new ezcMailAddress('*****@*****.**');
$mail->addTo(new ezcMailAddress('*****@*****.**', 'Any Body'));
$mail->subject = 'Daily digest';
$digest = new ezcMailMultipartDigest();
foreach ($retMails as $retMail) {
    $digest->appendPart(new ezcMailRfc822Digest($retMail));
}
$mail->body = $digest;
$transport = new ezcMailMtaTransport();
$transport->send($mail);