PDA

View Full Version : piping outgoing mail



dtest
10-11-2009, 06:15 AM
is it possible to pipe outgoing mail to a php script?

I want all mail that is sent via Outlook Express to go through a script on the server. The script would insert a custom header into the e-mail prior to delivery to the recipient.

EricJ
10-11-2009, 05:11 PM
The script would insert a custom header into the e-mail prior to delivery to the recipient.

By custom do you mean forged? The headers of the email really aren't supposed to be tampered with. Unless you are using the term 'header' to mean like a picture or something at the beginning of the body.

dtest
10-12-2009, 01:55 AM
oh no, nothing shady like that. sorry if it was confusing, I indeed mean header as in the beginning of the email (or maybe I'll put it in the footer, not sure yet...)

anyway, what I am trying to do is this:

on my website there is a shoutbox and I want all outgoing mail from a specific account (lets say info@mydomain.com) in my OE to include the latest shout from the shoutbox

so the php script would scan if "info@mydomain.com" is present in the email so it'll only apply this to e-mails sent from that account in OE

then the script would connect to the mySQL server to fetch the latest shout from my website and insert it at the beginning of the e-mail (it'll scan for "<BODY>" and inserts the shout text right after that)

dtest
10-17-2009, 07:05 AM
...anyone?

felgall
10-17-2009, 01:55 PM
Any adjustments to emails have to be made before the email is sent. To be able to automatically add content into emails you'd have to create those emails using a script on the server so that the same script can make the changes.

Once you hit send for the email the next spot where the entire email is guaranteed to be all together in one place where further processing on it can be performed is the recipients mailbox.

dtest
10-20-2009, 05:00 AM
so I guess it can't be done via OE. oh well, thanks for the reply