Changing email of a contact in address book

Hey guys,
I want to change the email of a contact in address book.
my code is as follow.
but somehow it doesnt work.
do you know why?
- (BOOL)peoplePickerNavigationController:
(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person {
CFErrorRef anError = NULL;
ABMultiValueRef email = ABMultiValueCreateMutable(kABMultiStringPropertyType);
NSString *personEmail = [conversationHistory getReceiver];
ABRecordSetValue(person, kABPersonEmailProperty, email, &anError);
CFRelease(email);
[self dismissModalViewControllerAnimated:YES];
return NO;

Congrats on finding a solution, David!
Actually the code you posted would've worked except that 'multi' isn't mutable. To fix that code, just make a mutable copy before adding the "other" email info:
- (BOOL)peoplePickerNavigationController:
(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person {
CFErrorRef anError = NULL;
ABMultiValueRef multi = ABRecordCopyValue(person, kABPersonEmailProperty);
ABMutableMultiValueRef mutableMulti = ABMultiValueCreateMutableCopy(multi); // <-- add
ABMultiValueAddValueAndLabel(mutableMulti, @"[email protected]", kABOtherLabel, NULL);
ABRecordSetValue(person, kABPersonEmailProperty, mutableMulti, &anError);
ABAddressBookSave(peoplePicker.addressBook, &anError);
CFRelease(multi);
CFRelease(mutableMulti);
[self dismissModalViewControllerAnimated:YES];
return NO;
- Ray

Similar Messages

  • Keep a list of email addresses, w/out making contacts in Address Book?

    Hi everyone. I frequenly send out emails to a long list (~30-40) of email addresses. I do not know the names of every person on the list, nor do I wish to make many new contacts in Address Book. Is there a way to simply keep that list of addresses as an email group, without having to add new contacts for each email address?
    For now, I'm copying and pasting the list from TextEdit into the "To:" box. It works well enough, but I'd like to streamline the process. Thanks in advance!

    Hi Alexander.
    If I’ve understood it correctly, you could just select a message previously sent to that list, then do Message > Send Again and change everything except the To header. The name of the Send Again command is actually a misnomer, as it doesn't really cause anything to be sent. It just creates a draft copy of the selected message which you can then modify and send like you would do with any other message.

  • How can I email a group list from my contacts/Mac address book?

    I love the Apple address book for making media lists for my PR business because it enables me to add dates and actions.  But when a client wants to see the list via email, I'm flummoxed. I've been rewriting as a Word document, but that eliminates the convenience of Address Book.   I could print, scan, and send,but that's cumbersome. If we can share a contact, why can't we share a Group list? Or, am I missing something simple?
    Thanks!

    Howdy J-carolyn9,
    Welcome to Apple Support Communities.
    Take a look at the article linked below, it’ll walk you through the process of printing a group of contacts from Address Book on your Mac.
    Mac Basics: Address Book - Apple Support
    If you'd like a tangible address book, print out a pocket-sized version of Address Book. Select the names that you want to include from the contacts list, or select a group, and choose Print from the File menu. Click Show Details, and choose Pocket Address Book from the Style pop-up menu, select any other options you want, and click Print.
    Ciao,
    -Jason

  • I have many contacts in address book from a certain company that just changed its name.  Is there a way to globally change all the contacts to the new company name all at once?

    I have many contacts in address book from a certain company that just changed its name.  Is there a way to globally change all the contacts to the new company name all at once?

    Rando510 wrote:
    Although clunky as you say, this sounds like a reasonably efficient way to accomplish what I was seeking.
    Address Book has no global find/replace. Bob Grove suggested one possible workaround; however, a grep-capable text editor (eg, TextWrangler) is better than TextEdit if complex strings are involved.
    An alternative is Bento (which is designed specifically to interact with the AB database), but it's not free.

  • How do i send an email to all of my address book contacts :

    How do i send an email to all of my address book contacts :

    Select them all and drag them to the To line of a new message (or, better, the BCC line). But be aware that most e-mail servers put limits on the number of addresses a single message can be sent to and daily limits on how many different addresses you're allowed to send e-mails to, as spam control measures.

  • Unable to create or edit AD (mail) contacts in address book

    Hi!
    I recently imported quite a list of contacts from an old CRM application into Exchange. All entries are nicely created in domain.local\company\location\Contacts. All fields are visible in Outlook under All Address Lists\All Contacts.
    As we have a small company, just a few users, I want to give most of them the rights to create and update entries in the All Contacts folder, just as they were used to in the old app.
    I started by creating role groups following this article:
    http://blogs.technet.com/b/rmilne/archive/2013/08/07/creating-rbac-role-to-delegate-contact-management.aspx
    I created an Admin Role group named Contact Administration, which contains the required Members, and I assigned two role groups to this group: Contact_Management, which is based on the Mail Recipient Creation parent group, and Contact_Management_2,
    which is based on the Mail Recipient parent group. The Write Scope is: domain.local\company\location\Contacts.
    Because this didn't result in anyone being able to update the contacts, I also created a group in Active Directory and delegated control on the contacts OU to this group, even though I think this doesn't add to the desired result (as it indeed didn't).
    What am I missing here? Any help will be greatly appreciated!

    Hi
    As per the information and details provided by you, to create or edit a mail contact in address book, please follow these steps: -
    Use the Shell to create a contact
    This example creates mail contact for Debra Garcia in Exchange Server 2013
    New-MailContact -Name "Debra Garcia" -ExternalEmailAddress [email protected] -OrganizationalUnit Users
    This example creates a mail contact for Alan Shen in Exchange online.
    New-MailContact -Name "Alan Shen" -ExternalEmailAddress [email protected]
    3.     This example mail-enables an existing contact named Karen Toh in Exchange Server 2013.
    Enable-MailContact -Identity "Karen Toh" -ExternalEmailAddress [email protected]
    To add a contact: -
    You can use the EAC to change selected properties for multiple mail contacts. When you select two or more mail contacts from the contacts lit in the EAC, the properties that can be bulk edited are displayed in the Details pane. When you change one of these properties, the change applies to all selected recipients.
    When you bulk edit mail contacts, you can change the following properties areas: -
    ·        Contact Information: - Change shared properties such as street, postal code, and city name.
    ·        Organization: - Change shared properties such as department name, company name, and the manager that the selected mail contact or mail users report to.
    I hope this information will be helpful for you.
    Thanks and regards
    Shweta@G

  • My computer has been infected with a Trojan Horse.  It has completely taken over my Mac email account and was sending out malicious email to everyone in my address book.  At the same time it infected my iPhone---I am no longer able to receive or send emai

    My computer has been infected by a Trojan Horse.  It has taken over my Mac email account and began sending out malicious emails to everyone in my address book.  I cleared out my MAC address book and began using my AOL email account. It took a few days and then my AOL email account was infected and has now been send out malicious email to all my contacts for over a month.  It has also infected my iPhone--I am no longer able to send or receive emails on my iPhone.  Also, once the Trojan Horse began using my AOL email it completely blocked me from using my MAC account by sending never ending popups asking for my email password to access my MAC email account, but it never accepts my pass word.  The TH has also slowed down everything on my computer.  It's like I am working on an old PC with dial up connection instead of the high speed digital connection that I have.  The little color wheel spins constantly as I wait for sometimes over a minute for a page to pull up.  If it pulls up at all.  I have tried to use the 2 disks that came with my computer to completely remove everything on my computer and then reinstall all the programs, but I am not allowed to sweep my computer clean.  I thought maybe my disks that came with my computer were defective so I called Apple and they sent me 2 new disks.  I am not able able to clear my computer with the 2 new disks either.  I have done this before successfully so it's not something new to me.  I do remember when I believe my computer became infected:  I had googled an unusual sewing term, and I was opening what appeared to be legitimate sites, when all of a sudden a pop up appeared that said that my computer had been infected.  I immediately shut my computer off, but it was too late.  I downloaded a virus program for Mac, and it has never found a virus or problem at all.  I think it is part of this Trojan Horse, but I am unable to delete it from my computer.  It refuses to uninstall.  The Mac Trojan Horse is real and it is terrible.  If anyone has any suggestions for me I would be very appreciative,
    Beth
    vu

    Install ClamXav and run a scan with that. It should pick up any trojans.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • Using O2M I imported my contacts into Address Book. However upon exiting the contacts are not saved. This is on a new Macbook Pro Lion OS. How does one save the newly imported contacts?

    Using the program O2M I successfully imported emails from Outlook 2003 to Mail, and calendar events to iCal. However, repeated attempts to import contacts to Address Book have failed. The contacts appear to import, but when I close Address Book and reopen it, the contacts are gone. I tried File-Save, but Save is greyed out. This is a new Macbook Pro with the latest Lion OS. I wonder if O2M has not been updated to work with Lion. Or is there something I am overlooking in the import process?

    Hi Denisej and others who have encountered the same problem,
    I tried your work around. Unfortunately it did not work out for me because in my contacts there are an unknown number that still "refused" to be imported like that. When such a contact was in the group I selected for import the whole lot would be lost again after re-opening Address Book. Finally that meant that I had to import each contact one-by-one, each time with the need to close down Address Book. A job to go nuts and end up with a mouse injury. So I decided to use the Migration Assistant that Lion now offers
    https://discussions.apple.com/thread/3284404
    together with Windows Migration Assitant on my old PC. Obviously both Mac and PC have to be on the same network. For this I did not need to do anything special. Both make use of the same router and that is apparently sufficient. When migrating the contacts Lion creates a new account, so you need to log in to that new account to see your migrated contacts. I used the Export Address Book Archive function in the Address Book menu to copy the lot to my own Apple account. I got rid of the new account and I was finally where I wanted to be in the first place.
    Kees

  • Can I overwrite contacts in Address book with my iPod Touch contacts?

    I'm an idiot - I somehow managed to delete ALL of my contacts in Address book. I don't use Time Machine (not enough external HD space) so I can't restore that way.
    I did happen to sync my iPod Touch shortly before I deleted everything so my contacts are fine there. Short of re-typing everything into Address Book, is there a way I can tell iTunes to overwrite my contacts with the ones from the iPod touch?
    It's the only place I have my contacts - and because I enabled Google sync, it deleted all of my Google contacts too! HELP!!

    If you sync, the contacts will be copied back into Address Book on your Mac. You should get an error message that pops from iSync (a warning about changing more than 5% of your data), which you should Allow.
    In case you're worried, I have tested this (backed up my address book, then deleted the contents, then synced and my contacts were restored from my IPT).
    Hope this helps...

  • IPhone 3G doesn't pick up all the contacts in Address Book

    I just laboriously entered a bunch of new contacts in Address Book. When I sync to iPhone with iTunes (7.7), most of them show up as expected. But about 30% of them are just not there. No entry at all on the phone, but I can still see them plain as day in Address Book. I tried setting the "Replace information on this iPhone" "Contacts" check box in iTunes and re-synching, with the same effect. From Address Book, I don't see anything particularly in common between the missing names (they mostly have both a phone number and an email just like the many contacts that made it OK). Any ideas?

    Huh, well I just poked around in Address Book (on the Mac) for a while, and it (then) became convinced that it was time for a save. So I did (File->Save) And then the synch found the rest. So odd, though. I know that one of the contacts missing was the first one I entered! Between this and very funky behavior after importing vCard files from google (which was so bad I had to wipe the whole thing out), I can't say I'm so impressed with Address Book.

  • IPhone not syncing Contacts to Address Book

    I noticed that my iPhone (both original iPhone and iPhone 3G) was not syncing contacts with Address Book. I tried to Reset Sync History in iSync, and when I have tried to replace the contacts on iPhone under the Advanced options, I lose all my contacts on the iPhone!
    The only way to get some contacts back is restoring from backup, but unfortunately as iTunes performs a backup of the iPhone on sync, these backups also have no contacts! I have an old backup that fortunately has not been overwritten but the contact list is a bit out of date.
    Address Book on the Mac seems to be fine and this is backed up.
    It would appear that iTunes has somehow lost its "connection" to Address Book, which is why when I chose to replace the Contacts on the iPhone with the information on the computer I lost them all!
    iCal still seems to sync fine with Calendar.
    Can I re-link Address Book with iTunes?

    Jason L wrote:
    Hey lim_my,
    Are contacts syncing with MobileMe or any other applications?
    I don't have MobileMe.
    Now you mention it, Address Book did not appear to even update if I updated a contact in Mail.
    Can you sync contacts in another User account? to create another user account goto System Preferences> Accounts> click the lock to make changes> click the + button to add another user account.
    Yes I can! I only tried to sync Contacts, leaving all other options i.e Calendars Bookmarks Ringtones Music Videos Applications untouched, and now I have some test Contacts on the iPhone.
    You can try Resetting the SyncServices folder, Just follow the steps in this article to stop the service and then delete the SyncServices folder in your user library.
    http://support.apple.com/kb/TS1627
    I had tried this before, within iSync, which did not work. I then tried the command in Terminal as per the above link, then went and deleted the /user/Library/ Sync Services folder. Still no joy.
    So it looks as though I have a broken Address Book rather than iTunes. Should I post this in the OS X Leopard section of Discussions?

  • Unable to send mail to importet contacts via address book

    Hi all,
    I've searched the web without finding a solution to my issue with one of my users, so I had to create my own thread.
    My issue is that one of my newly employed users importet a large amount of contacts (over 3000) from his previous workplace (which worked after a little trouble via manually importing a .pst file), but when he tries to add contacts to a mail via address
    book and send the mail, he receives a mail back with "the following recipient(s) cannot be reached"
    I can resolve the issue by copying the mail address, under the contacts profile, and pasting it in the "Email" field, basically retyping the same mail. The mail will then go through without any return mail stating the above error. I could do the
    same for all 3000 contacts, BUT that is a lot of time needed, which I would really like to avoid.
    We are running Exchange 2010 and Office 2013.
    I'm hoping for a fix from one of the clever minds in here!
    Thanks in advance!

    Hi,
    Does the issue happen when sending mails to all these 3000 contacts? Please send test message by adding other contacts to a mail via Contacts in Address Book to check whether the issue can be reproduced.
    Please make sure the latest patches and service packs are installed for your Outlook 2013. Additionally, please try the following test to narrow down the issue:
    1. Please switch to People panel in Outlook, click a imported contact, click Email in HOME tab. Then send a message to check whether this message can be sent successfully.
    2. Please open the Contact PST file in Outlook instead of import PST file. Then do step 1 to send test message and check whether the issue persists.
    If the issue doesn’t happen when sending message to contacts in opened PST file, it indicates the Contacts which is saved in the PST file should be correct. The issue may be related to Contact resolved in Outlook client. Please create a new Outlook contact
    or create a new Outlook profile to have a try.
    Regards,
    Winnie Liang
    TechNet Community Support

  • Sync iPhone Contacts to Address Book on iMac

    Is it possible to sync or to export iPhone (G3) "Contacts" to "Address Book" on an iMac?
    ...or will the sync process in iTunes move information form the iMac to the iPhone?

    Overview of syncing iPhone, iPad or iPod touch with your computer: http://support.apple.com/kb/HT1386
    Contacts, calendars, notes, and bookmarks are synced from (or to) your computer, so if you add, change, or delete them on the device, they are changed on your computer, and vice versa.
    Before you sync, be sure your Mac's Address Book has at least one contact so you will get a merge prompt.

  • Importing contacts to Address book (organized)

    Hello,
    Someone was helpful awhile back and told me that if I selected all emails in Mac Mail (within a folder), I could send them to address book. Basically I want to send all contacts from a folder in Mac Mail over to address book in an organized fashion. I did the export but now I don't know how to find the new contacts in address book. It just lumped in the new contacts with the others....
    Is there a way to organize address book by date added (contacts)? Does anyone have any suggestions on how to do this? I tried dragging over the emails into a group folder in address book but that didn't work.... Thanks!

    Smart folders aren't real folders, just sort of Aliases that contain certain criteria in th whole thing.
    Like you could make a Smart folder that containd names that had b in the name, that fake folder when clicked on would look like it cantain those that have b in the name, but just really points to only those.
    Experiment a bit with them, you can delete them without alarm because it's just a separate DB of them.

  • All my contacts in Address Book suddenly vanished

    Hi,
    I was updating a contact in Address Book, (usual story, new address and email address arrived in a Christmas card), and when I clicked on the 'save' button my address book window suddeny lost all it's data. The page I was updating, which had previously been showing the contact details, now showed as 'No card selected' And at the bottom of the window it said '0 cards'
    All my groups were showing as having nothing in them either.
    Any ideas how I might get all my contact data back, please?
    (I have a feeling that the data is there somewhere, because if I start to write a new email message auto-complete remembers and fills in the address. (Which it gets from address book, doesn't it?)

    Update:
    I have used Time Machine to replace the Address Book app with the app that was running satisfactorily a few hours ago, but it has made no difference whatever. I still have a completely blank book.
    Is there a data file somewhere I could re-load using Time Machine?

Maybe you are looking for

  • How do I get files from mac to ipad

    Just brought IPAD Mini and can't get my documents to sync over. Have Microsoft Office 2011 for MAC. thomasdc28

  • SQL QUERY - Dates

    Hi Everyone I want to chabge a format for a date which is stored as Text in this format '2008/04/01 00:00:00'.I tried to_char but it returns an error message saying "The attempted conversion of a character string to a number failed because the charac

  • Whenever firefox opens a new window a bar comes across the screen at the top with the word "allow" or an "X" on the right side. When I use allow, it closes.

    This happens when I have only one tab, or window, open. Example, I am on a site like my banking site, and each time I click for a new operation, the black bar comes on just under my tool bar and asks if I want to allow the move to a new page, but it

  • Strange dialogue box popping up

    After about 6 months of use, phone suddenly began repeatedly popping this message: This accessory is not made to work with iPhone. Would you like to turn on Airplane Mode to reduce audio interference? You will not be able to make or receive calls. Ju

  • Firefox plugin reloading bug work around

    Hi all, I'm wondering if anyone has a work around for the firefox bug referenced here: https://bugzilla.mozilla.org/show_bug.cgi?id=90268 The bug consists of how firefox handles plugins such as flash. Firefox loses the flash objects current state whe