Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Notepad++ Email Plugin

0.00/5 (No votes)
27 Jan 2016 1  
Email Plugin for Notepad++ in C#

Introduction

Today, most of us use Notepad++ (based on Scintilla) as our general purpose editor. Notepad++ provides a way to inject your own plugins. Just create your plugin and put its DLL file to the right location and you are done. Here is an example of writing plugin(s) for Notepad++ using your favorite language C#.

Background

The example plugin is a simple email plugin, that will allow the user to email current file's contents as email attachment. It allows the user to set mail server configuration and send emails using GUI injected by the plugin.

Email settings are stored in a text (.INI) file but password(s) are stored in encrypted format to provide a security layer for your credentials.

Using the Code

The source code is organized in a directory structure that is self-explanatory. Below is a short description of how directory structure organizes the code.

  • Core/Npp - Contains classes to send commands to Notepad++
  • Core/Scintilla - Contains classes that wraps scintilla types
  • Core/Platform - Contains class(es) for DLL Imports
  • DllExports - Contains class(es) for exported functions called by Notepad++ plugin system
  • Forms - Contains Windows forms for GUI

The PluginUI class contains the functions required for UI Registration with Notepad++. PluginExports class is responsible to export the functions called by Notepad++. Please go through the below link to understand how Notepad++ plugin system works.

To deploy the plugin, compile the project and copy the DLL file to {Notepad++ Installation Folder}}\plugins folder or you can use Notepad menu Settings>>Import>>Import plugins for the same. Once the plugin is deployed, start Notepad++ and you will see the your plugin icon(s) on Notepad++ toolbar. You can also find your plugin under Plugins menu.

Below are screenshots of installed plugin:

History

  • 27th January, 2016: First version

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here