[imp] Generating a Compose message (with content) via script

Michael M Slusarz slusarz at horde.org
Tue Dec 31 19:41:22 UTC 2013


Quoting Robin Bankhead <horde at headbank.co.uk>:

> Thanks for the reply, Michael.  I can understand the anti-abuse  
> concern, but within our internal setup this is not a concern.  The  
> goal is just to save some RSI on our users when sending boilerplate  
> replies (templates really, with some variables drawn from an  
> incoming message and from our database, then customised manually as  
> needed).
>
> I tried POSTing a form to /imp/dynamic.php with the "to", "subject"  
> and "body" parameters and this worked for a short body, but not a  
> longer one.  Can I ask where in the code the length-limit is applied?

Nowhere in Horde.  This sounds like a PHP limitation in your config.

> I sense that implementing my own module within horde might be the  
> "proper" approach here, if working at a lower level is required to  
> play in tune with safeguards like the above.  Maybe this would also  
> allow me to do more fancy things I had in mind, such as designating  
> the generated message as a reply to a given message.  Do you agree,  
> or am I still likely to need to hack IMP core to some degree?

You will still be likely to be hacking IMP.

The bigger issue for you for this kind of approach is that there is  
zero guarantee that IMP code is not going to change internally.  You  
can spend the time and create the code that works with the current  
code, but a month for now it will not work, because internal code  
changes.  (There is no fixed API for internal code.)  That's why a  
solution that requires a publicly available API interface is much  
preferable.

I have no problems with someone expanding the current  
compose/batchCompose API call(s) to allow for a much more granular  
control of sending options.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the imp mailing list