I’m looking to have a solution where I can send iMessages to mobile phone numbers from my FileMaker database. So far I have an applescript like this, which works just fine:

tell application "Messages"
	send "Tobias testar script" to buddy "+46XXXXXXX" of service ""
end tell

Is there a way to let an applescript get info about if a iMessage was unable to be sent?
I’m planning on an applescript that will send an iMessage, and if that imessage fails to be sent the script will send a text message through Skype instead (I already have a script for the Skype part).

The secret is you don’t use Messages to send your text, you use Mail. It is a little secret that you can send a text message via an eMail, you just need to know which phone carrier they are using. There is even a FileMaker script function called “Send Mail” (it’s at the very bottom of the list) to assist you in sending the email.

Here’s the big four:


macman_al, thanks for your reply.

I’m in Sweden so maybe the phone carriers here have their own email addresses then?
How do you write the email so that it will convert to a text message to a specific number?

It would be a surprise to me if the phone carriers here would say OK to send no costs text messages through an email - too good to be true is my first reaction…

There are hundreds of carriers around the world that have mail-to-text gateways.

I found a list here:

For Sweden:
Comviq GSM
Tele2 (for this last one, the recipient must first enable the service by sending text ‘ON’ to 1612)

To do it, just compose the mail message in the usual way. For example, if you want to send an SMS text message to a person with the phone number 123-456-789, and if that person uses Comviq GSM, you would address the email to:

I realize I’m replying long after your original post, but I hope you find this helpful.