mail2rss - vedanta.barooah@gmail.com
+-----------------------------------+
class name: mail2rss,
functions:
1) mail2rss($username,$password,$mailserver='localhost',$servertype='pop',$port='default')
constructor function takes in the mail username, password, mailserver, servertype i.e pop or imap, and the port which defaults to 110 for pop and 143 for imap.
2) makefeed($rss_title="MAIL",$description="MAIL",$web_url=NULL,$item_link=NULL,$language='en-us')
the main worker function that reads the mailbox and creates the feed, all the parametes are optional, but passing them to the function will give you a sensible rss feed.
3) show()
Spits out the rss feed to a browser or feed reader
4) createfile($filename)
create a file with the rss written in, usually the file created should have *.xml extension
5) close()
every good citizen closes resources once they opens them, this function does the same by closing the active imap/pop connection
if you find this piece of code useful, and need enhancements or find bugs... please do write to me,
thanks,
vedanta barooah |