How do I automatically add email addresses to the address book?

I'm trying to work out a way to ensure incoming messages to Mail with a specific phrase in the subject line will have their email addresses automatically added to a specific group in my address book. Any ideas?

I have one that is close, so I have made a couple of changes and it MIGHT do the job. I recommend backing up your address book before trying. You will need to change the script at line 3 to use whatever group name you want. The script will most likely fail if the group does not exist. This version has had very limited testing, and in particular there is no error handling built in - I don't know how it will behave if the sender of the mail has not provided a two-part personal name.
Store the script in your (not the system) Library/Scripts/Applications/Mail and point your rule at it. You will also be able to use it by selecting messages in mail and using the Scripts menu.
AK
click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">using terms from application "Mail"
on perform mail action with messages theMessages
set GroupName to "Test"
tell application "Mail"
repeat with ThisOne in theMessages
set TheSender to (extract name from sender of ThisOne)
set TheAddress to (extract address from sender of ThisOne)
set FName to word 1 of TheSender
set SName to word 2 of TheSender
tell application "Address Book"
if not (person TheSender exists) then
set theGroup to group named GroupName
set NewABEntry to make new person with properties {first name:FName, last name:SName}
tell NewABEntry
make new email at beginning of emails with properties {label:"work", value:TheAddress}
end tell
add NewABEntry to theGroup
save addressbook
end if
end tell
end repeat
end tell
end perform mail action with messages
end using terms from
using terms from application "Mail"
on run
tell application "Mail" to set sel to selection
tell me to perform mail action with messages (sel)
end run
end using terms from
</pre>

Similar Messages

  • How to add extra lines in the address field?

    How, if possible, to add extra lines in the address field? For example, the street address might require two lines:
    Bob Smith
    Newport A  Unit 32
    Century Village
    Aventura, FL 

    Thanks, Barney! It's even easier than the solution I came to: copying and pasting into the field. 

  • How do I send an email to a group address using my iPad

    I use and IPad Air 2 with latest IOS and am trying to send and email to a group.  How do I do this?  I simply type in the group name when I'm sending the message from my iMac, however that doesn't work on my iPad.  I have the group set up on my iCloud account and have that account selected on my iPad, still when I type in the group name, nothing comes up.  Suggestions?

    I Might have worked this out! Go into contacts, tap add. When the box comes up put the name of the group you want to create as the first and last names. In Add email box neR the first email address, then tap add email address again and add another email address, continue until you have entered all the email addresses for the group. When finished tap Done.
    Open email and in the To, Cc or Bcc box key in the name of the group. All email addresses should then receive the email when you tap send.
    this works for me on my iPad air 2.
    THIS HAS WORKED FOR ME YESTERDAY AND TODAY! 

  • How do I automatically add filenames as keywords?

    I want my filename to always be added as a keyword/metadata.

    darn okay. i name them according to a hr/mm convention for race photos. then they only have to search for the hh/mm.
    thx for the help though
    Show me your passion and I'll immortalize it.
    Scott [email protected]om
    Date: Wed, 17 Feb 2010 09:40:46 -0700
    From: [email protected]
    To: [email protected]
    Subject: How do I automatically add filenames as keywords?
    First, I still don't understand why anyone would want to search by file name if search by keyword was available.
    Putting the file name into a keyword essentially defeats the purpose of keywords. If you have 1000 files in your Lightroom Library Module, then you have 1000 distinct keywords, and I can't see how that is useful to anyone.
    But the bottom line is that I don't think Lightroom has the capability of putting file name into the keyword field.
    >

  • HT1349 how can I change an email for authorization, the email address we used years back, is no longer a valid email address

    how can I change an email for authorization, the email address we used years back, is no longer a valid email address

    SfromW wrote: ... how can I change an email for authorization, the email address we used years back, is no longer a valid email address
    How to change account here: http://support.apple.com/kb/PH1641
    If you need more help, start here: http://www.apple.com/support/itunes/
    SfromW wrote: ... we can't remember the password from the old email address (for authorization)...
    Help Retrieving and changing passwords here: http://support.apple.com/kb/HT1911
    If you need more help, from iTunes for Windows, click  iTunes > iTunes Store > Support
    SfromW wrote: ... apple should make it easier to transfer authorization authority....I would think anyways.
    You might want to rethink your thoughts about making transferring authority easier.  Making it too easy would certainly degrade your account's security.  If you still believe it should be easier, you can send feedback directly to Apple via http://www.apple.com/feedback/itunesapp.html
    You will not get a response, but you can be certain that the responsible Apple people will see your input for consideration in FaceTime product development.
    As a new user, please understand that you are NOT directly addressing Apple here.  For more info about Apple discussions, start here: http://discussions.apple.com/static/apple/tutorial/etiquette.html 
    Message was edited by: EZ Jim
    Mac OSX 10.7.4

  • HOW TO SEND PERSONALIZED EMAILS (WITH SAME MESSAGE) TO ALL ADDRESSES IN THE ADDRESS BOOK - WITH RECIPIENTS SEEING ONLY THEIR NAME BUT NOT WHO ELSE IS GETTING IT

    HOW TO SEND PERSONALIZED EMAILS WITH THE SAME MESSAGE, BUT WITH THE INDIVIDUAL RECIPIENT'S NAME... (OR NAME AND THE EMAIL ADDRESS) TO ALL ADDRESSES IN THE ADDRESS BOOK - WITH RECIPIENTS SEEING ONLY THEIR OWN NAME WITHIN THE BODY OF THE MESSAGE TO THEM ?
    ALSO, HOW TO ELIMINATE ALL THE OTHER NAMES FROM THE LIST - SO THEY CAN NOT SEE WHO ELSE IS ON THE MAILING LIST, AND WHO ELSE IS GETTING THE SAME MESSAGE?

    In the csv file, the column headers must match the the special references in curly brackets.
    So you either change the column header in .csv file or the bit in the curly brackets in the Template email.
    To change the column header:
    In the example shown below, I wanted to use the first two columns
    'First Name', 'Last Name' note the exact spelling.
    I also wanted the email address which was in a column called 'Primary Email'.
    To make it easier for me, I copied the Primary Email column and inserted it into the third column position and then changed the column header name from 'Primary Email' to 'Email'. (This meant I still had the original column header just in case). see image below.
    But you could just change the column header name from 'Primary Email' to 'Email' without moving column about - up to you.
    At this point check that all the contacts do have a valid email address.
    then save the file.
    If you do not want to edit the .csv file, then you need to edit the template email.
    eg: {{First Name}} {{Last Name}} <{{Email}}>
    change to : {{First Name}} {{Last Name}} <{{Primary Email}}>
    If still having an issue, please post two images.
    One image needs to show the row of column headers used in .csv file.
    The other image needs to show the Template email, so I can see how you have used the curly brackets.

  • How do I send an email with a group address and not show the addresses/names of the recipients?

    How do I send an email with a group address and not show the addresses/names of the recipients?

    Use BCC.   That's blind carbon copy.   And copy paste the address into the BCC field.  It really depends what e-mail program you use how to enable BCC.

  • How do I put a contact group into the address of an email

    The email form does not have an address icon.  How do I get a group from the address into the address field of a new email?

    The problem is defining what it even means to “embed” a PDF file in the body of an e-mail, especially if you are dealing with a multiple page PDF file.
    E-mail is either pure text, rich text (something akin to RTF in Word), or HTML. PDF is not compatible with any of these. Thus, to embed a PDF file, something has to be converted and that means the PDF would be converted to a less graphically rich raster format. But is that what you would really want?
    I think that the MacOS and iOS e-mail clients do under some circumstances place an attached PDF file within HTML segments and by clicking on same, you get the equivalent of extracting the full PDF file, but I have no real experience with that.
    Another alternative is HTML with a proxy image with a hyperlink to an external PDF file that is invoked when you click on the hyperlink.
    Perhaps you can explain what you are really trying to accomplish and what the recipient of such an e-mail's actual experience would be?
              - Dov

  • How do i stop firefox from automatically opening a new tab when i type an address into the address bar?

    when i type a new address into the address bar and press enter, firefox automatically opens the site in a new tab. i want it to just open in the same tab.
    == This happened ==
    Every time Firefox opened

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • How do I automatically add objects to a profile when I add a Z tcode?

    Hi,
    I've noticed that when I add some SAP standard tcodes to a role menu it automatically adds certain objects in the profile.  How do I make this happen for my own Z tcodes?
    I have created a tcode ZSTMT for one of my programs.  In the program I'm checking object F_BKPF_BUK so I'd like PFCG to automatically add this object to a profile when I add the tcode to the menu structure.  How do I do this?
    Thanks,
    Gill

    Hello Gil,
    those proposals have to be maintained in transaction SU24.
    b.rgds, Bernhard

  • New OS Issue -----10-27-13 I downloaded the new OS to my MacBook Pro. Now, when I address an email, it puts the address in there twice.

    10-27-13 I downloaded the new OS to my MacBook Pro. Now, when I address an email, it puts the address in there twice. How do I stop that, please? Thank you

    Thank ypu for your thought.
    Yes, I do have it turned.
    When I type the first few letters of the address, it shows the correct address. When I hit <enter>, the name appears in the address section twice. Only began to happen after the downloaded update.
    Cheers,
    Joe

  • How do I stop autofill of addresses in the address bar

    I just switched to Mac from PC. I purchased a used macbook with OS X (10.5.5). I am trying to figure out how to stop Safari from automatically displaying website addresses in the address bar when I start to type in an address. Also along the same subject, is there a way to clear that information as these are websites the previous owner visited and some are rather vulgar. Any help would be appreciated.

    hi there, jhy --
    Welcome to Apple Discussions!
    We're a bunch of Mac users helping each other,
    so glad you found us.
    Ok, here's where to go for starters, OK?
    1. Go to the main Safari menu, at the upper left corner of the menu bar,
    Then select "Preferences", then go to:
    General: Remove history items "After one day."
    Autofill: Uncheck all options of Autofill,
    go to "Edit" button for each one, and select "Remove All."
    Then go to
    Security. Select "Show Cookies" and then "Remove All."
    Then to over to the Google Search "Search Discussions" at the upper left side ------->
    and click and hold on the magnifying "Q" thingie just to the left of the word "Search"
    and select "Clear Recent Searches."
    That at least is a good start, I hope.

  • How can I (automatically) import new photos of the photostream on my local disc (Mac)? Don't want to use new icloud service. Simply import.

    New Photo app on Mac.
    How can I (automatically) import new photos of the photo stream on my local disc (Mac)? Don't want to use new icloud service. Simply import.
    With iPhoto every new photo was automatically imported and saved on my local disk (with "full resolution" that's what I only need). In the new photo app I have still my photo stream and when I move a photo (drag and drop from the photo stream) to a new album it indicates a (plus). My understanding is that the photo is now copied to my local disk. But when I deleted the photo in the photo stream it was also deleted in the album !?
    If that is the case I can use the photo stream only until I reach the max of 1.000 photos, then I have to delete photos and I will have no copy left.
    How can I "physically" copy a photo of the photo stream to my local disk? I just want to "transfer" all pictures taken with Ipads, Iphones to my central storage on the Mac. Please don't propose to connect it via iTunes (cable) to the Mac.
    Any other suggestions?
    thx
    -Tom

    The amazing device cannot do it because no amazing developer has written an app for it.  There is some interest, others have asked, but i have a hunch that the market is fairly limited, and no developer has jumped at the chance just yet.
    Any sort of tethered approach means try to feed the material to the pad thru the cck.  Which means the app would have to use the allowed/existing cck pathway in a manner that does not violate the sandbox rules.  That may be the problem.

  • Is there a way to automatically add text to video; the text gleaned from order data?

    is there a way to automatically add text to video; the text gleaned from order data?

    What is "order data"?

  • How can i print an email without printing the attachment?

    I just got my new macbook pro retina display.  I am using Mac mail and want to know how I can print an email without printing the attachement.  Any suggestions and solutions would be appreciated.

    Thank you for your suggestion.  But when I receive an email that has an attachment (shown by paperclip symbol) The email opens and shows the attachment(jpg picture) at the end of the email so when I go to print - the email pops up with the picture already opened inside the body of the email.  Can not figure out why this happens in mac mail.  when i used outlook in windows only email would show.  in order to see attachment you had to click on paperclip and only then would the attachment (picture apprear).
    Any other suggestions that I may could try would be appreciated. Thank you!  Gabriela

Maybe you are looking for

  • Display PDF and get possibly modified data back

    Hello we want to display a PDF in the SAP-GUI, either inline or external via the registered application (Adobe Reader, Adobe Acrobat or whatever). If the user has an application that is capable of editing a PDF-Document, we need to get the document's

  • Battery will not charge, but works fine on ac.

    I tried resetting the pmu, and using different ac adapters, but to no avail, sometimes the light on the power supply changes to amber, but the charge on the battery remains zero, any tips? (I press the button on the battery without the ac adapter and

  • Sum up currency calculated column in a standard list view

    Hi How do I total up a currency format calculated column in sharepoint 2010. I am having a problem referring to the articles on the net. Nothing seems to be working. Can I use jquery or something, or can I do it with editing in in the sharepoint desi

  • I phone camera and photo album

    When I got my iphone I went a bit snap happy. I now have about 80 pictures stored on the phone. I want to delete the whole roll - deleting one by one takes to long. Is there way I can do this? Also, my phone has become much slower than it was, I wond

  • Use of tokens in AMT

    Can anybody explain me what the tokens are in AMT and how they must be used. Are tokens only for security on control level ? And what are the advantages of using these? Thanks for your help.