I don't have an answer, but I do have a couple of questions / comments that may be useful.
First and foremost. Computer software never does things 'randomly', which means the key to solving this is mostly a matter of trying to identify what the "sometimes" actually is. Even knowing how often "sometimes" is can provide a clue... For example, is it every second email? one in ten? Something that only occurs once a week? Once a month?
Does it only occur when the orders that trigger the problem only have this item in the cart? Perhaps its only when there is this item plus another item. Or perhaps if the order contains a mix of physical and downloadable items, or perhaps only on orders that cause two (or more) items to drop below the stock level?
Maybe it only occurs with certain customers? Have these customers opted to use plaintext emails, or perhaps its only those that use HTML formatted mails?
Maybe it is only when products are from a particular category?
I must admit that I'm clutching at straws for ideas here, but if you dig deep enough you *will* find that a pattern will emerge that will give a clue as to the cause.
As strange as it may sound, this problem would be easier to diagnose/fix if it was an 'all the time' thing rather than a 'sometimes' thing.
Things that only occur 'sometimes' are actually the most difficult of problems to resolve. Rarely ever is there going to be an easy answer.
If you could provide further clues we will be able to make better guesses. :)
Cheers
RodG
Bookmarks