Sending mail (invisibly) from inside a Mac LC app

Richard Miller wow at together.net
Wed Apr 2 07:33:44 EDT 2014


The challenge with this issue (of automatically sending an email from a given computer) is that I need to offer the easiest, most compatible, and the safest method to the user. The users of this app can range from a single computer home user to a large corporation with many Macs installed.

To work for home users, the solution needs to be dead simple. Mail is installed on every Mac. Almost every user can configure mail to send an outgoing message. Using AppleScript to trigger an email runs so quickly that the user will rarely see it happening. Yes, there will be a record of the email in their sent box. But my app only sends an email when it identifies a problem with the users hard drive or OS... so not worried about hiding anything.

I am still looking into the PHP script option for corporate users.

One alternative solution is to have my app pop up a notification on the users desktop alerting them to the problem. This avoids the need to send an email altogether. But I have been told that this solution is probably not acceptable in a corporate environment.

Richard




On 4/1/14 8:33 PM, Bob Sneidar wrote:
> Is that really invisible? If they are in Apple Mail, don’t they see the mail being created and sent? Also, it will be in their sent mail. Not my idea of invisible. Further, this will only work if an email account with working SMTP has been already created, and if the SMTP server ever becomes unavailable and your app attempts to send something, it will pop an error.
>
> Bob
>
>
> On Mar 28, 2014, at 19:33 , Richard Miller <wow at together.net> wrote:
>
>> This solution looks promising. Used the following as an applescript. Worked perfectly. Just requires that each Mac have a working version of Mail installed.
>>
>> ---------------------
>>
>> set recipientName to "Richard"
>> set recipientAddress to "rdmiller at together.net"
>> set theSubject to "Type your subject here!"
>> set theContent to "Type your message content here!"
>>
>> tell application "Mail"
>>
>>         ##Create the message
>>         set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
>>
>>         ##Set a recipient
>>         tell theMessage
>>                 make new to recipient with properties {name:recipientName, address:recipientAddress}
>>
>>                 ##Send the Message
>>                 send
>>
>>         end tell
>> end tell
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the use-livecode mailing list