|
From: Dieter S. <dsi...@sq...> - 2001-09-24 18:56:37
|
You can add a new sub in the is.pl file. Add a button "E-mail Text
Invoice" then add the sub
sub e_mail_text_invoice {
}
use the other email sub and substitute the filename and remove all the
formatting codes. There is no need to introduce new variables just add a
new sub.
You can do the same for saving the invoice to a file.
The long term goal is to move to a XML interface and produce forms in a
variety of formats, based on a filename extension variable.
I believe your assumptions are correct, the majority of people are using
html aware email clients. Your email is the first in three years asking
for a text version. That should tell you that there isn't much call for
it.
Dieter Simader http://www.sql-ledger.org (780) 472-8161
DWS Systems Inc. Accounting Software Fax: 478-5281
=========== On a clear disk you can seek forever ===========
On Mon, 24 Sep 2001, peter green wrote:
> * Dieter Simader <dsi...@sq...> [010924 10:57]:
> > You can save the invoice from your browser.
>
> Hrm, I was hoping for something a little more automatic. Like just
> automatically saving the HTML version to the fs from e_mail_invoice() (in
> SL::Form::parse_template()?). Or adding another button that does the email
> and web page (so as not to pollute e_mail_invoice() with stuff that isn't
> strictly email). Or to build a wrapper function send_invoice() that checks a
> configuration variable in sql-ledger.conf and determines what exactly should
> happen.
>
> Thoughts on any of those?
>
> > To use plain text invoices copy the invoice.html to invoice.txt and edit
> > the file. Then edit email_invoice.html and <%include invoice.txt%>
> > instead.
>
> Fair enough. To get the link in the text email, though, I would need to base
> it on the variables already available to me (in the hashref $form). In
> addition, some of the variables in $form (e.g., address, signature) have
> ``<BR>'' in them after e_mail_invoice() transforms them, so I would need to
> introduce add'l variables that really have ``\n''.
>
> Are people really sending HTML-only email invoices? Is the assumption that
> the percentage of people that use text-only email is insignificant enough
> not to worry about?
>
> Just FYI, my *real* intent was to send the email as multipart/alternative
> with both the text and HTML versions. However, Microsoft, in all of its
> brilliance, equipped Exchange with the ``feature'' of overwriting the text
> part of a multipart/alternative email with a (POORLY!) rendered version of
> the HTML. Forget what the *user* wants to see (text v. html), Bill Knows
> What's Best. >:-(
>
> Anyway, thanks for the help!
>
> /pg
>
|