Page 1 of 1

MAILTO limits

Posted: Mon Dec 22, 2014 4:43 pm
by MaxV
Hello,
I usually write the following code to write an email to multiple recipients:

Code: Select all

put "me@livecode.com,you@livecode.com,he@livecode.com" into tRecords
launch URL "mailto:myemail@livecode.com?bcc=" & tRecords
Now my tRecords variable contains a lot of address and sometime I get the following error: can't open file. :shock:
So I realized that there is a limit of addresses that confuse Livecode and it interprets the URL like a file, instead of launching my email client. Unfortunately I can't understand what is this limit, because it isn't a fixed number of emails, neither a number of chars of tRecords.
Sometime I get the error over 80 emails, sometime I get the error over 100 emails, I can't find a rule.
Can you help me?

Re: MAILTO limits

Posted: Mon Dec 22, 2014 6:18 pm
by FourthWorld
Such limits are usually governed by the email client rather than LiveCode.

Re: MAILTO limits

Posted: Tue Dec 23, 2014 11:50 am
by MaxV
Thunderbird has no limit on recipients, so it's Livecode related.
Any other suggestion?

Re: MAILTO limits

Posted: Tue Dec 23, 2014 4:31 pm
by FourthWorld
The limitation isn't with the number of recipients one can interactively enter into the client UI, but with the length of the data that can be passed to the program via a mailto URL:
https://www.google.com/search?q=thunder ... ngth+limit

Complicating matters, the governing RFC (2368) mandates no specific limit, and each mail client has its own (if memory serves Outlook is the shortest).

If this is a one-off for yourself you might consider sending in batches, and if for public use you might consider crafting a CGI, perhaps with LiveCode Server, which would receive the data via POST and then send the emails from there. There may also be some SMTP libraries in the community, but with the ever-increasing security on email servers that may prove more difficult than to set up a CGI service for yourself, or use an existing commercial bulk mail service.