Apple script to send imessage to all users in contact list.

I was given this today to be completed today. I have this so far that I found from another post and modified it.
tell application "Messages"
     set myid to get id of first service
     repeat with i in {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
     set theBuddy to buddy {i} of service id myid
     send "test" to theBuddy
    end repeat
end tell
It errors out when sending a message to myself. Even though my apple id is not in the contact list and if it reaches a number that is not registred with imessage it errors out.
any suggestions?

I think you're a little wide of the target here.
In an ideal situation i would like to take all 118 people in my address book.
Nothing in your script references your address book at all. Buddies on your buddy list don't necessarily match your Address Book contacts.
Take their mobile number store it in a list and then send my message to them.
You're also  referncing molibe numbers, not IM accounts, which are not the same thing. Are you planning on sending out SMS messages to these people? are you sure they're OK with that? Most providers charge for text messages so your plan actually costs your recipients money (assuming you're using a service that has a IM -> SMS gateway).
I guess the system keeps an internal index of those numbers named "buddy" i don't know i'm just guessing here.
When you ask Messages for a buddy, it's referncing names in your Buddy List (Window -> Buddies). That's the list it is iterating through.
I would have liked to skip the manually sending a text message though.
I thought the whole point of this was to automate the process, no?
Management see's this as a good communication tool
That might be the problem right there
I'm going to have to figure out how to make it more usable than what it is now.
It would help if you clearly defined your goals. It sounds like you want to send a message to a group of people in your address book. Since there are multiple communication methods (SMS, iChat, AIM, Google Chat, Yahoo, etc.) you need to clarify which method you want. Once you have a clearer idea of your goals it should be easier to work out the implementation.

Similar Messages

  • Sending mail to all users

    Folks,
    In Communigate there was a default 'all' account which could be used to send mail to all users. I know I could set up a mailing list to do this but does the Apple Mail server have a built in option for sending an email to all users?
    /// kak
    powerbook   Mac OS X (10.4.7)  

    No there is no such option.
    You will either need to setup a mailing list or create an alias that forwards to all your users.
    Obviously both solutions require that you add new users to the mailing list or alias.

  • Sending mail to all users in Messaging Server 5.2

    Hi,
    I'm trying to send mail to all the users in my mail server, but haven't been able to do it. I'm using a command called deliver which is found in /opt/iplanet/server5/bin/msg/store/bin . I've tried sending messages to all users but have been successful in sending only to one user. Got any ideas??

    To create a dynamic mailing list:
    http://docs.sun.com/source/816-6009-10/users.htm
    If you're familir with ldapmodify, you can locate the user's pab in the directory server, and remove what you find there, but, honestly, I'd talk to the user first.. . .. .
    A user can work around removal of such, very easily. Any mail client, and a copy/paste will do it.

  • Send notification to all users of specific responsibility in 11i

    Hi All,
    Is there anyway to send notification to all users of specific responsibility in 11i ?
    I have a setup form for hierarchy level (e.g level 1 - 5) by which each level will be notified either by responsibility or user?
    If its setup by responsibility, notification will be sent to all users under that responsibility.
    Do i have to create role using WF_DIRECTORY.CreateAdHocRole and add all users for specific responsibility to the role?
    Also if the responsibility setup changed, how to maintain the existing notification with the old resp.
    eg. level 1 is set to resp X then later on set to resp Y.
    Regards,
    Fendy

    Use 'Expand Roles' to achieve this. Please check the WF Developers Guide to see how it works.
    Yes, you may use wf_directory.createadhocrole for this purpose too.
    What do you mean when you say the responsibility has changed? It it is end-dated no notification should be sent to any of its members. It depends on the assignments of the role/user. if the assignment is used then the user will get it. If the assignment is end-dated then the user will not get the notification.
    You can always use wf_local_synch.Propagate_user_role to change the assignment of a user/role. If you want to end-date it, you can use it. Or you can add another user to the role, etc.
    Hope this helps,
    Alejandro

  • Apple script to send email

    I need an Apple Script to send a generic email without it opening Mail does anyone know how to do this?

    You need to have an open application to script. This is so even if you use Bash and postfix. I advise that you use AppleScript and let it open Mail.

  • Can't send iMessage to one of my contacts!

    I suddenly cannot send iMessage to one of my contacts, but i 100% sure that person phone is turned on, imessage is work and did not block me. As that person can send me iMessage. And i have already tried all the steps to solve it, such as
    Restart your device.
    Tap Settings > General > Reset > Reset Network Settings on your iPhone.
    Make sure that the contact trying to message you isn't blocked in Settings > Messages > Blocked.
    If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    If the issue occurs with a specific contact or contacts, delete and re-create the contact in the Contacts application. Create a new message to the newly created contact and try again.
    Back up and restore your device as new.
    but all did not work. Please help!!!!!!!!!!!!!

    Hey newgen5015,
    I understand that your iMessage seems to work normally with everyone except your father. To troubleshoot the issue, I would follow these steps on both of the devices:
    Restart your device.
    Tap Settings > General > Reset > Reset Network Settings on your iPhone.
    Make sure that the contact trying to message you isn't blocked in Settings > Messages > Blocked.
    If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    If the issue occurs with a specific contact or contacts, delete and re-create the contact in the Contacts application. Create a new message to the newly created contact and try again.
    Back up and restore your device as new.
    from: iOS: Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Do one step on both devices, then test, and if it doesn't work move to the next step and repeat. If you run through all of them on both devices, it should resolve the issue.
    Welcome to Apple Support Communities!
    Regards,
    Delgadoh

  • Yahoo app on iPhone seems to be sending spam to all my yahoo contacts. I know this because my "Sent" folder on my app shows i sent it out at 5 AM this morning and I was not using my phone at that time. Also the signature show signature from iPhone

    Yahoo app on iPhone seems to be sending spam to all my yahoo contacts. I know this because my "Sent" folder on my app shows i sent it out at 5 AM this morning and I was not using my phone at that time.
    Also the signature show signature from iPhone
    "Sent from Yahoo! Mail for iPhone"
    Aside from deleting application does anything else have to be done?

    Backup your iPhone. Tap Settings > iCloud > Storage & Backup > > Back Up Now
    iCloud: Backup and restore overview

  • Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.

    Is there some way to add multiple addresses to an email I am sending that doesn't close the contact list after I click on an address?  This necessitates constantly going back to click the + sign to add each address separately.  Is there some way I can open the contact list, click on all of the individual addresses to which I want to send the email without the list closing between each address entry, and have all of my address entries be listed to the email at one time?  Something like it works in Gmail.  I do not want to use set lists, I want to enter different addresses each time I send an email.  And I am a very slow typist, so I don't want to type the first few letters of each recipient's name.  It is much faster for me to just click on the e-mail addresses in the list as a group.  It doesn't make any sense to me to have to reopen the contact list for each address, when it should be so easy to click on all of the addresses I want at one time and then click once to add them all to the email as a group.  If there is a solution to this, please tell me.  Thanks.

    Vatlily,
    Try this:
    1. Select Mail>File>New Message.
    2. Select Mail>Window>Address Panel.
    3. Use (command+click) on the desired addressees in the Address Panel to create the list.
    4. Click "To:" on the top left of the Address Panel.
    The group that you selected will be added to the "To" field in your New Message.

  • HT5361 How to send a mail to my entire contact list of my Mail app ?

    How to send a mail to my entire contact list of my Mail app ?

    Hello Madhu,
    The only way to send an email without opening a client is: using server-side mail objects invoked by your app.
    This would be the workflow:
    - your user fills in form data (subject, body, mail_to)
    - your application sends form data to a server (via httpservice or webservice or AMF)
    - the server takes care of sending the mail in a way that is transparent to your user
    So: it is not possible to send emails without opening the iPhone client (I think by "outlook" you mean the "mail client" with an Exchange account) for security reasons. You wouldn't want any app to send mails without you pressing "Send" in a known interface.

  • After updating to ios7 I lost all my data, contact list, pictures, etc. How can I recover them?

    After updating to ios7 I lost all my data, contact list, pictures, etc. How can I recover them?

    from your backup ,you do have a backup ?

  • Why can I not send an e-mail from my contact list?

    Why can I not send an e-mail from my contact list?

    I responded to your other post.
    Have you set up an email account on your iPad? What is happening when you try to send an email?

  • New iPhone 5 not sending iMessages to all iPhone users

    Hello,
    I just purchased a new iphone yesterday (5s).  It is sending all text messages to my husband as texts rather than iMessages (he has iphone 4s).  However, it sends iMessages to my Mom's iphone without a problem.  I have tried all of the common fixes:
    1. Power cycling phone
    2. Resetting network connections
    3. Turning off iMessaging and turning it back on
    4. Turning off iMessaging, resetting network connection, turning iMessaging back on
    None of these methods has resolved this issue. 
    I have confirmed that his phone has a data connection/wifi.  This was not an issue before switching to new iPhone, my previous iPhone 4 sent iMessages without a problem. 
    Can someone please advise on how to fix this - this is super frustrating for me. 
    Thank you!

    It says they are sent from my end, no exclamation marks at all. The other person has got a nokia (i think, looks like an imitation of the blackberry) and is on tesco mobile. i have gone through their phone and theyve not blocked me, i can still make calls to them fine. As far as i am aware, this is the only contact they dont send to. I have looked online and have seen some iphone users claiming it is a glitch with the iOS setting??

  • Iphone sending iMessage to all but one of my contacts, what's going on here?

    So my friend and I can't seem to send iMessages between our Iphones.  I have tried to delete their contact information and delete all the past conversations we have had and re-added them to my contact list.  They can send me iMessages just fine.  I should also note that I am the only one on their contact list that seems to have this issue.  They are able to recieve iMessages from everyone else.  When they were living in Australia we did not have any of this issues.  However, since they have returned to Canada and set up their plan, suddenly I can only send them text messages.  We do not have this issue with anyone one else on our contact lists, this is an issue that exhists only between our two phones.  How can this issue be fixed?

    Does anyone in the community know the answer to this ?
    Alternatively - which email address should I direct this to to get an answer from Apple?

  • Send email to all users who have not submitted a form (SharePoint 13, SP Designer 13)

    Hello all, I have been reading posts all day and have not come across the right solution. We have about 2,200 users in our site collection.  I need to design a workflow that sends every one an email with a link to my blank form, then, once a week I
    need the workflow to notify only those users who have not submitted the form.  The part I am having trouble with is querying the users who have not submitted??? is there a way to use the form library data as a data connection and compare it to the data
    in the UPS DB? that's really what I need to do, compare users who have submitted to all users.
    Thanks for any help

    I will suggest to create a timer job (which will run every week) and read library for all submitted form item's created by field and compare with data set which will come from UPS DB. Once these two set is ready,
    use not in clause using LINQ to send email. 
    This is a draft outline solution which came to my mind. Hope, it will help.
    please 'Propose as answer' if it help you, also vote this as helpful if you like this reply.

  • Send email to all user mailbox

    Hi all,
    Is there a way to send an email to all user mailbox in exchange 2013 without have to create a distribution group for everyone? Something that even when we have new users they will still receive it without have to making sure they are part of the distribution
    group.
    Thanks.

    Hi ,
    You can create a single dynamic distribution group with the condition to have only the mailboxes in exchange as its members . Then when a person send an email to that  Dynamic distribution group it will get distributed to all the mailboxes
    in exchange.
    Note : Most important feature in the dynamic group is that the membership of that group will be maintained automatically and also along with that we can have group membership by defining the recipient types/OU /rules.
    I agree with ED and also based on my knowledge you cannot achieve your scenario without Distribution groups or dynamic distribution groups.
    Thanks & Regards S.Nithyanandham

Maybe you are looking for