Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6231443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:56:11+00:00 2026-05-24T09:56:11+00:00

Has anyone ever successfully figured out the method to alter the to, cc and

  • 0

Has anyone ever successfully figured out the method to alter the to, cc and bcc fields of an outgoing message in a Mail.app plugin? I’ve been looking through the header files trying to figure out exactly what I need to do to get the list of recipients of the message, and have the ability to alter them (specifically, to remove some recipients and switch the remaining recipients to be bcc’ed).

Note: I know where I would need to look to find out how to do this, but I’ve spent some time on that and there are a lot of different classes that do this and the amount of guesswork needed is nontrivial. I’m merely hoping someone has gone through this already in the past and can save me from the duplicate effort.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:56:12+00:00Added an answer on May 24, 2026 at 9:56 am

    Figured it out!

    The window that you use to compose a message is a MailDocumentEditor, which inherits from DocumentEditor. DocumentEditor has an instance variable called _headersEditor which is a HeadersEditor object.

    HeadersEditor has instance variables for the to, cc and bcc fields, named _toField, _ccField and _bccField, respectively. These are instances of AddressTextField.

    There are methods that can get you the addresses that have been entered into the AddressTextField. If you are familiar with Mail, addresses can appear in here in a few different ways. Some are just plain text addresses, some are tokens for address book entries (so they show up as tokens with the name, which you can right-click to get the email address). You can create accessors for the NSMutableArray*s _stringsWithNoRecords and _stringsAwaitingRecords, as well as the NSMutableDictionary* _recordsForStrings.

    However, to set the addresses of these fields, create an NSCell using initTextCell:(NSString *) with the email addresses you want in these fields. Then, call the setCell: method on the AddressTextField. This will replace the contents of that field with your NSString in the NSCell.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone ever seen an exception thrown when calling close method on any closable
Has anyone ever experienced this situation? I've got a JQuery method that works well
Has anyone ever had any luck figuring out how to add a comment to
Has anyone ever set up Cruise Control to build an OS X Cocoa/Objective-C project?
Has anyone ever heard of a UNIX shell written in a reasonable language, like
Has anyone ever done work to get Ruby to do continuations (like Seaside on
Has anyone ever tried, or had any success at getting Wascana (Eclipse CDT +
Has anyone ever seen the storage class auto explicitly used in C/C++? If so,
Has anyone ever used the Bridge pattern in a real world application? If so,
Has anyone ever modified the post-new.php file in their WordPress installation? I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.