
Klemen - 2009-08-13 10:59:53
Dear Manuel,
First of all thanks for such a powerful MIME parser, it has proved most useful to me and I tried many others found on PHPClasses.
I do have one concern and would like to hear your thoughts: with the "SaveBody" set to 1 the bodies are stored in a temporary folder with names "1", "2", "3", etc... The file names are stored in "BodyFile" variable. This all works great.
My concer is, on a busy server processing many e-mails with large attachments wouldn't it be possible that two or more e-mail are being parsed on the same time? For example one e-mail starts parsing then a few miliseconds later another e-mail starts parsing (by another thread), before the first one finishes. Wouldn't the second e-mail files overwrite the first one because they have the same names, before the first one could finish (it could take few seconds to parse and move large files)?
Wouldn't it be beter to give temporary files unique names? For example instead of "1", "2" and "3" they could have a random string in front, like "k4ur2tz_1", "k4ur2tz_2", "k4ur2tz_3", etc.
I am just thinking, didn't have such problems yet.
Thanks,
Klemen