This article is adapted from Josh Aas's blog post Writing an NPAPI plugin for Mac OS X.
MailPluginFix is a free tool which will help you to fix any incompatible Mail.app plugin (GrowlMail for example) after an update of Mac OS X. Just start the application and you will see a list of all incompatible plugins for your current Mail.app installation. Just select the ones you would like to fix and press the start button in the toolbar. Set up Exchange account access using Mac OS X 10.10 or later. If you're running Mac OS X version 10.10 or later, follow these steps to set up an Exchange email account: Open Mail, and then do one of the following: If you've never used Mail to set up an email account, the Welcome to Mail. Mail Plugin Manager is a small OS X app that aims to improve your overall user-experience whit OS X’s Mail utility by providing you with a feature that has always been missing: a plugin manager. Enable, disable, remove, update, or download new Mail plugins with just a few clicks. Use to Mail Plugin Manager to enable, disable or even remove plugins for Mail without having to dig around in folders. Free SmallCubed Mac OS X 10.10/10.11/10.8/10.9 Version 2.2.5 Full Specs. With version 1.3.5 (Mac OS X 10.8/Mountain Lion), the maximum number of mailboxes in the lists defaults to 20 but can be changed as described below. In earlier versions the maximum number of items in the lists is determined by the “Number of Recent Items” setting for Documents in the Appearance panel of the OS X System Preferences.
Before you go on reading this article, you may wish to grab the sample code located here, as it will be referenced during this tutorial. The sample is posted under a BSD-style license that means you can use it for anything, even if you don't plan to release your source code.
Getting started
If you check out the Mozilla source code in Mac OS X, you can simply open
BasicPlugin.xcodeproj
in Xcode, click Build, and you're done. Xcode will create a 'build' directory next to the project file, and if you built it in release mode, that folder in turn contains a 'Release' directory with the plugin inside it.To install the plugin, just copy it into one of these two locations:
- /Library/Internet Plugins/
- ~/Library/Internet Plugins/
From this point, you can simply modify the sample plugin to do whatever you want.
Notes and tips
This section provides some additional information that may be helpful if you're trying to get a plugin building on your own.
Info.plist
The plugin communicates its MIME and filename extension information using the
Info.plist
file, which is packaged in the plugin bundle. The plugin also communicates its bundle type in that file, under the key CFBundlePackageType
; the type is 'BRPL'
. If the type isn't an NPAPI plugin type, the bundle won't load as an NPAPI plugin. You can always just use 'BRPL'
.XP_MACOSX
It's important to define the GCC preprocessor definition
XP_MACOSX
to 1; this is used by the NPAPI headers to build properly on Mac OS X. If you don't define it, they won't be interpreted correctly. This is easy to miss in the sample project's build settings.Symbol visibility
Symbol visibility is a common problem for people trying to get NPAPI plugins working. Some symbols must be visible as standard C symbols so the browser can find them, which means they need to be prefixed by an underscore, and must not have the C++ obfuscation that is generated by the C++ compiler.
The three symbols that must always be visible are:
NP_Initialize()
NP_GetEntryPoints()
NP_Shutdown()
The sample plugin is written entirely in C, using a standard Xcode build configuration, so by default all of its symbols are C-style and visible.
If you want to implement your plugin in C++ or Objective-C++, you need to tell the compiler to export them in C format by using
extern 'C'
in the header, like this:You can check to be sure your symbols are visible and in standard C format by using the nm utility provided among the Mac OS X developer tools:
See also
Original Document Information
- Author(s): Josh Aas
- Last Updated Date: October 24, 2008
Mail User Guide
![Plugins For Mac Os X Mail Plugins For Mac Os X Mail](/uploads/1/1/7/8/117815240/931405475.jpg)
Mail can import email messages that have been exported in mbox format from other email apps, and import mailboxes exported from Mail on a Mac. You can export mailboxes in mbox format.
Import mailboxes
- In the Mail app on your Mac, choose File > Import Mailboxes.
- Select a source in the list, read the information that appears below the list, then click Continue.
- If you’re importing a mailbox exported from Mail or a folder in the ~/Library/Mail/V7 folder on another Mac, select Apple Mail. To get to the Mail folder on a Mac, click the desktop to make sure you’re in the Finder, press and hold the Option key, choose Go > Library, then click the Mail folder.
- If you’re importing messages from a Windows or UNIX computer, select “Files in mbox format,” then locate the folder containing the files.
- Reorganize the imported messages, if you like.The messages are in a new mailbox called Import in the Mail sidebar. You can drag folders and messages from the Import mailbox to new or existing mailboxes, then delete the Import mailbox.
Export mailboxes
- In the Mail app on your Mac, select one or more mailboxes, then choose Mailbox > Export Mailbox.
- Choose a folder or create a new folder, then click Choose.Mail exports the mailboxes as .mbox packages. If you previously exported a mailbox, Mail doesn’t overwrite the existing .mbox file; it creates a new .mbox file, such as My Mailbox 3.mbox.
Plugins For Mac Os X Mail Not Connecting
See alsoCreate or delete mailboxes in Mail on MacRename mailboxes in Mail on MacRestore mailboxes and their content in Mail on Mac