Instead it is a
decision left to the developers of email clients.
Zend_Mail currently supports the Mbox and Maildir formats and the key difference between the two is the
former requires application-level file locking to maintain the integrity of the message. Aside from that there
isn??™t much benefit going into great detail about the formats which means we can now get back to working on
our application.
9.4.2 Reading email with our application
Just as we did with the earlier stages in the development of our support tracker, we will again jot down a few
requirements for this additional work before we start. This list makes it easier to see exactly what we are trying
to achieve and how Zend_Mail helps us to accomplish it. So far the requirements we have put together are:
3. Periodically read mail from a designated mail account and store it in the support table.
4. Include some details about the reporter.
5. Save the original email as a file attachment.
Opening a connection
Before we can do anything with the stored mail the first thing we need to do is connect to it. For our support
tracker it??™s probably likely that we??™d use a local storage location and access it with either
Zend_Mail_Storage_Maildir or as in the following example with Zend_Mail_Storage_Mbox:
$mail = new Zend_Mail_Storage_Mbox(
array('filename' => '/home/places/mail/inbox')
);
If we needed to access a remote storage location we??™d do so using Zend_Mail_Storage_Imap or
Zend_Mail_Storage_Pop3.
Pages:
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269