Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

Truly simple question

posted by getkristan 7 years ago

Hi there!

I am attempting to add a PHP mail parsing feature to a site of mine and it looks like I will try to implement your fMailer class.

First off... THANKS!

My PHP is only "intermediate level" and I havent worked with email before. So one question..

Do I not have to include a path to individual mailboxes on my server somewhere? I have 3 separate mail accounts attached to my domain. I am just surprised that there is no "/path/to/admin/mail/inbox" or anything like that, like I have seen in the other email parsers I have just been examining. I'm sure this just demonstrates my ignorance of how mail systems work behind the scenes. Will I have access to all the mail in all accounts? Or is there something I am not getting?

fMailbox is designed to read from IMAP or POP3 connections. That being said, some of the methods can easily be used to parse and read Maildir type mailboxes, but this is very dependent on how the mail is stored on your system. If your mailserver is configured to use Maildir, then you should be able to write a few lines to read the files in the directory and pass them to fMailbox parse functions.

I use this for bounce scripts as well as unsubscription mailboxes. Maildir, however, will also have separate mail directories for each user. You could probably use fDirectory to make this a bit simpler in terms of reading the mail from the Maildir.

Other mailbox formats wouldn't work so well, for example, mbox, which stores a collection of messages in a single file.

posted by mattsah 7 years ago