Re: [exim] Saving and/or processing attachments

Etusivu
Poista viesti
Vastaa
Lähettäjä: Aurelin
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [exim] Saving and/or processing attachments

> Woah. Why? If you deliver to pipe, the pipe gets the whole mail.
> No need to invoke use of $message_body at all.


Uhm, great! But how do I actually process the e-mail that is piped to
a script?
I mean, I need to store the attachment in a particular place and then
fill in a DB with the description and the image name. And I might just
be blind, but I can't find a way to make use of the e-mail content in
a script without using $message_body.

If it helps, here's my set up (please let me know if this is complete
and utter idiocy, I literally haven't heard of Exim until this request
came up) :

# TRANSPORTSTART
send_to_script:
driver = pipe
command = /usr/bin/php /path/to/script/post_to_site.php
--message=$message_body --message2=$message_body_end
--subject=$header_subject --sender=$sender_address
--id=$message_exim_id --recipient=$original_local_part

# ROUTERSTART
mailpost:
driver = accept
local_part_prefix = post-
domains = services.squareflo.com
transport = send_to_script

So in post_to_site.php, how would I catch the e-mail content?
Or can I use pipe to write into a file and then start the script that
pushes everything into the database?

Aurelin