Page 1 of 1
Looking for "email-to-website" code
Posted: Fri Nov 17, 2006 10:20 am
by redhair
Anyone can help me where to find a system like this:
* Users must be able to send bug rapports with attachments via email.
The email address should look like "*product*-*bugfix*@server.com".
* The email must be passed on to members on the mailing list.
* The email must appear -on the or like a- website with message and attachment under the *product* category as defined in the email address.
Something like this exists?
Posted: Fri Nov 17, 2006 11:00 am
by Chris Corbyn
Are you able to create the addresses manually or does it need to be dynamic? You'll need to modify your MX configuration in order to have them dynamic (probably).
After that, it's not straightforward. You can go one of two routes.
1. Write system filters for the SMTP-end of things such everything is done when the email hits the MX (less complicated but you need outright access to the SMTP server itself). You can "pipe" messages over to a PHP script with MySQL access.
2. Use the IMAP functions from PHP in order to open the mailbox remotely via cron or such like and parse the emails from there.
Making it fully working is way too much to post in here though

Posted: Fri Nov 17, 2006 11:34 am
by redhair
The idea is so simple, as usual, but the realisation complex.
I just realise that the subject line could also contain the bugfix part, so email address could just be "product"-
bugfixes@mailserver.com subject: *bugfix*. So email addresses don't have to be dynamic but can be manually created.
Thanks for some pointers.
I'll do some more digging/ brain storming with them.
Posted: Fri Nov 17, 2006 1:34 pm
by feyd
In the same vein as IMAP, you could abuse the catch-all address of the domain to support this sort of functionality.
Posted: Fri Nov 17, 2006 1:49 pm
by Chris Corbyn
Why not just have one single email address for tracking and provide different info via the subject?
Posted: Fri Nov 17, 2006 2:01 pm
by redhair
d11wtq wrote:Why not just have one single email address for tracking and provide different info via the subject?
Then users have to specify the product in a predefined way in the subject for the script to filter out which product we are dealing with. I think my second idea would work better, where the product is defined by it's address.
Posted: Fri Nov 17, 2006 4:30 pm
by nickvd
redhair wrote:d11wtq wrote:Why not just have one single email address for tracking and provide different info via the subject?
Then users have to specify the product in a predefined way in the subject for the script to filter out which product we are dealing with. I think my second idea would work better, where the product is defined by it's address.
Either way they will have to enter the product they're submitting the bug report for... using a single email address with varying subject (which can be pre-filled using mailto:
email@address.com?subject=Productname-bugreport) would be much easier to deal with on the php side..
Posted: Fri Nov 17, 2006 5:14 pm
by redhair
i found the solution with a little help from
this class.
All we have to do now is setup an email for each individual product like:
product-bugfix@myserver.com
The script I'm using will read the emails+subject sent to that address and parse them on the website, just like I wanted it to.
The rest, like sending it on to the rest of the users is peanuts.
Thanks for thinking along with me!