Sending an email with a file attachment
Warren Samples
warren at warrensweb.us
Fri Sep 14 10:29:23 EDT 2012
On 09/14/2012 08:13 AM, Richard Gaskin wrote:
> Peter Haworth wrote:
>
> > I'm beginning to think Matthias' idea of putting the environment
> > data on the clipboard and asking the user to paste it into the
> > email client of his/her choice may be the easiest and safest way
> > to do this.
>
> Maybe I'm coming in late to this thread, but if the body of the email is
> less than 1k have you considered just sending it along as a param in the
> url?:
>
> on mouseUp
> put "someone at somewhere.com" into tAddress
> put "Hello!" into tSubject
> put "This is the body"&cr&"of the email." into tBody
> put "mailto:"& tAddress & "?" \
> & "subject="& tSubject &"&" \
> & "body="& tBody into tEmailURL
> launch url tEmailURL
> end mouseUp
>
> I use this to have customers send bug reports, and I can grab the OS
> version, my app's version, screenRect, and other useful info along with
> the relevant portion of the executionContexts all within the size limit
> on the URL passed to most email clients.
>
> So far the only really restrictive client I've come across in years is
> GMail, which apparently allows only ~512 chars; everything else our
> users have tested on allows at least 1k, which has been plenty to get
> the info I need from them.
>
This script causes unexpected problems here. It launches KMail on my
system despite my having Thunderbird properly set as the default system
email client. What happens if no desktop client is being used? (I
honestly don't know, I have never been one of those people who use
web-based mail.) Can one be assured that that behavior will be
consistent? A second problem on my system, running Linux, is that the
body is not inserted into the message. This seems to be related to the
number of parameters the system will pass to the email client. It
accepts only two, apparently. So, recipient's address + (pick one: cc,
subject OR body). revMail also behaves exactly this way here.
Warren
More information about the use-livecode
mailing list