[eluser]david_ais[/eluser]
I've found an explanation to what was happening but so far not a solution.
In this scenario, both attachments are PDF files. My email client is Microsoft Entourage
It turns out that the attachments are there. But when the email goes to an IMAP account, only one attachment is visible with the name of the first one that was attached. But the two attachments are merged in some way. When I try to open it, Acrobat reports that the file is corrupted.
If the email is sent to a POP3 mailbox attachments work as normal.
If I download the email from the IMAP server to my local client, both attachments appear and can be opened normally - both locally and from that point on, are accessible in the IMAP server - even though they we're before!
I've tried this with two different IMAP accounts on different server platforms with different ISPs, and also have generated the emails both from CI scripts and manually, and with different PDF files. So that seems to eliminate issues with the mail servers, with the PDF files, with the client sending the email and with the CI script. I'm not sure what's left!!
Although the attachments are eventually accessible, I still need to try and resolve this to avoid the problem completely. The attachments accompany an order confirmation generated by my CI based shopping cart system. So it's essential that the attachments are fully accessible.
I know this doesn't look like a CI problem now. But has anyone got any ideas on how to sort this out? Plan B is to send two different emails. That'll work but it's using more resources than it needs to and ideally both attachments need to accompany the order confirmation email.
Regards
David