Sending mail (invisibly) from inside a Mac LC app
Ben Rubinstein
benr_mc at cogapp.com
Wed Apr 2 07:47:45 EDT 2014
I'm still surprised that your original approach of doing SMTP directly from
inside LC wasn't sucessful.
I have an app that does data transformation jobs on a regularly scheduled
basis, and sends reports via email. I coded it many years ago, basing this
part on Shao Shen's libSMTP; with simple configuration options for SMTP
server, port, auth type, username and password; and since then it's been
deployed by a number of different clients, and we've always been able to
configure it successfully to work with the mail server in their environment.
For home users, maybe you could use AppleScript to extract the configuration
from their Mail app at startup, and if necessary ask them to confirm the
details (you probably have to ask them to confirm the password even in the
best case); for corporate users getting the details of their mail server may
have to be part of the (one time for the organisation) configuration. But
once you have the configuration, taking this approach feels more robust, since
it doesn't require using AppleScript to work with a third-party piece of
software which may change outside your control (Apple are rubbish at
implementing their own technology, including AppleScript, consistently) and
may not always be installed.
(On my own Mac for example, Mail is always there, because it's not worth the
trouble to deinstall it; but I've never used it in all the years since moving
to OS X. (I used to be an Outlook/Entourage user, then I switched to
Thunderbird). So your software would launch Mail, which would then appear and
ask me to configure it, I'd decline.... etc.)
My $0.02
Ben
More information about the use-livecode
mailing list