Hi,
I have a php-based CRM system, which, amont many other functions, sends email messages to our customers.
A few employees need to view those emails when client calls and asks about some data. Those employees have access to common IMAP mailbox (let it be [email protected]).
What I want to do is:
- Send email to a customer from address [email protected]. DONE, with Zend_Framwork Zend_Mail, with mail() function as transport, but I am willing to change transport to smtp, and rewrite or modify it.
Get full message source of email just sent (would be best if it already had message-id header added).
This is the part I need help with.
Open SMTP session to our example.com mailserver and store the source to [email protected] mailbox. I know how to do this. I just need to send 3 commands: MAIL FROM: <...>; RCPT To:...; DATA I checked this with telnet and its woking great. I can deliver an exact copy of message to the mailbox and if a reply cames back, it is properly attached to the injected message. Just need to replicate this in php, but that is not a problem.
The problem lays in 2) Does anybody have an idea how to get the exact source of sent message, or how to generate closest possible copy of that source?
UPDATE:
BCC: will not do the work, as I have to modify the message by replacing some things like passwords with stars in the source.
Also, no serverside filters possible, as serveradmin refuses to implement them.