When sending an email through our CRM system, I'd like to put a copy of the email sent in the relevant staff members Sent folder. This works no worries in Gmail/Google Apps which automatically stores emails sent through their SMTP server in the Sent folder, but most mail servers don't work like this. Besides moving everyone over to Google Apps or (B)CC'ing the sender on each email, is there any way I can actually do this?
I can open the connection easily enough using cfimap, send the email using cfmail, but how do I then store that sent email into the sent folder?! It's easy enough to move one email from one folder to another using cfimap, but I can't figure out how to get the right messagenumber for the email just sent via the mail server and move that one into the Sent folder. Even if I had to regenerate the entire email and then save it, there doesn't seem to be anything like php's imap-append?
I see that in Bluedragon there is an imapconnection and imapfolder option, which would be perfect, but these don't work in plain old cfml.
I have been googling this for a few days now, and also checked out a bunch of similar threads on SO. Most are answered with 'put an email address on (B)CC', which is of course an option, but I don't want to immediately give up on my ideal solution.
Any ideas, or is this is a dead end?!