Please refer to another post named Mail fetch, delete, record bot. This script/bot complements that. It will check a postgresql database if any messages need to be posted or mailed through a site, to its members? It may be any site...a site like this escripts where programmers will leave messages, IMs, emails etc. and we need to get them, they may be sites like ebay, [url removed, login to view], any dating site..or many others where the user has an account, which needs to be posted to or whose member needs to be sent a message to.
A cron script will run n times a day and spawn the bot. If a site needs to be posted a message to, according to status in the database, the bot will call a handler/fetcher bot built according to the site. This bot will login to the site and get the indicated messages from the database and post them one by one and log the same in the database. The bot will also delete the messages from the sent folder on the site. After finishing with the posting activity, it will pass a message to the invoking bot...you tell the method...system call, pipe, socket, file on disk which is checked by the parent bot periodically or something else.
Parent bot logs completion of a successful run & exits.
In all this, care has to be taken to handle system crashes, program crashes, multiple runs of the same bot etc. The bot has to have the signature of a web browser & execution is to be configurable and never harm the activity of the site being checked for mail/messages.
All communication in PMs please.
With best regards.