SquirrelMail  
Donations
News
About
Support
Security
Screen shots
Download
Plugins
Documentation
Sponsors
Bounties





Junk Email Filter






Security Notice
Phishing campain
Version 1.4.15
Security Upgrade

You can jump right to the SquirrelMail compose screen to send a message when you click on a "mailto" link on any web page. This feature was available starting in SquirrelMail 1.1.2, but was removed and/or became broken in some versions since then. Most recently, it has been verified to work again in versions 1.4.12 and 1.5.2.

Note that depending on the client browser being used and how the client operating system is set to handle "mailto" links (see below), you may have to log in every time before jumping to the compose screen. Some browsers (such as Firefox) and operating system configurations, however, may allow you to use your current login session (if any) and bypass the login screen for maximum convenience.

If your browser and operating system require a login every time, you can try using the "Login: Auto" plugin (http://squirrelmail.org/plugin_view.php?id=33), but be cautious of the security implications of using such a plugin. Version 1.1 of this plugin may work, but if no newer version has been released yet, you should grab the one posted on this mailing list thread: http://article.gmane.org/gmane.mail.squirrelmail.devel/9043

More information about logging in quickly can be found here: LoggingInQuicker

The client computer must be configured to use SquirrelMail when handling "mailto" links, and can be done as such:

The recommended way is to use the following file found in the SquirrelMail distribution package: contrib/squirrelmail.mailto.NT2KXP.reg (or squirrelmail.mailto.Win9x.reg for older Windows systems). Place the contents of this file (make sure to only use the part of the file starting on the line after "Cut here") into a text file on the target computer, named exactly "squirrelmail.mailto.reg" (without the quotes) (make sure the file extension is in fact ".reg", and not ".txt"). Find the text "http://example.org/squirrelmail" and change this to the correct address for your SquirrelMail installation. When the file has been saved, double-click on it and confirm that you want to add the information to the registry.

Once the registry has been updated in this manner, you can now choose SquirrelMail as your system's default mail program by going to the "Internet Options" configuration window, which can be found in the Control Panel or in Internet Explorer by clicking on Tools-->Internet Options. Choose the "Programs" tab and SquirrelMail will be an option under "E-mail".

This completes the correct "mailto" handling instructions for SquirrelMail, however, you can also use an abbreviated and less ideal solution outlined as follows:

The Windows registry entry for HKEY_CLASSES_ROOT\mailto\shell\open\command can be directly changed to point to SquirrelMail in a format it understands. Please be aware that if you change your system's default E-mail program, this value will be lost (which is why you should follow the recommended instructions above). You can do this in one of a few different ways. Here are two examples known to work - one for using Firefox and one for using Internet Explorer (you need to change "example.org/squirrelmail/" to the correct location for your SquirrelMail installation, and you may need to adjust the path to your browser in some special circumstances):\n

"C:\Program Files\Mozilla Firefox\firefox.exe" "http://example.org/squirrelmail/src/mailto.php?emailaddress=%1"

"C:\Program Files\Internet Explorer\IEXPLORE.EXE" "http://example.org/squirrelmail/src/mailto.php?emailaddress=%1"

It has been suggested that this may also work, but it seems less reliable:\n

start "http://example.org/squirrelmail/src/mailto.php?emailaddress=%1"

WARNING: Change your Windows registry settings at your own risk! It is always advised to set a system restore point or otherwise backing up your registry before modifying it in any way.

If you know what you are doing, you can modify the registry directly by clicking the "Start" button and then select "Run" and enter "regedit" (without the quotes) and click "OK". You can then navigate to HKEY_CLASSES_ROOT\mailto\shell\open\command, right-click on the default name and choose to modify the registry value, entering one of the values suggested above. You may want to save what was there first, so you can easily revert it.

Here is a script that can set this up, so that you can place it on a distribution CD or some other media in order to easily set it up on every PC that needs it. Just create a file that is called Squirrelmail.vbs with Notepad (or any ASCII text editor) and insert the following:\n

Callentry = "C:\Program Files\Internet Explorer\IEXPLORE.EXE http://example.org/squirrelmail/src/mailto.php?emailaddress=%1"

Set objArgs = WScript.Arguments
set Wshshell = WScript.Createobject("WScript.Shell")
Wshshell.Regwrite "HKCR\mailto\shell\open\command",Callentry,"REG_EXPAND_SZ"

Change Callentry = "..." to something that works from the PC's in your Network. If you prefer to use a .reg file (just double-click and it modifies your registry), use a text editor (like notepad) and create a file called sm.reg and put in it these lines. Again, don't forget to change the URL so that it works for you.


REGEDIT4\n

[HKEY_CLASSES_ROOT\mailto\shell\open\command]
@="iexplore.exe "http://example.org/squirrelmail/src/mailto.php?emailaddress=%1"''''''"


It seems as though this works on every Windows platform (95 or better). If not, just edit this page and tell us!

A quick way to test if you have it set up properly is to generate and use a test mailto link. A great script is at http://developer.netscape.com/viewsource/husted_mailto/mailtoApp.html that will let you set specific values and let you test the mailto url right from the form. If you log into SquirrelMail and get the compose screen with all of the data when you test the mailto link, then everything is set up perfectly.


Also note that Michael A. Puls II has written a modification to the mailto.php that translates the HTML 5 mailto protocol handler into the format that SquirrelMail expects. Currently, the HTML registerProtocolHandler only works in Firefox, but works extremely well. For more information, see this post from the SquirrelMail archive: http://www.nabble.com/compose.php-and-HTML5%27s-registerProtocolHandler-td21276335.html. To configure Firefox to handle mailto links, along with Michael's code, you will need to access your SquirrelMail website, and type the following into Firefox's address bar, inserting your domain as appropriate:\n

javascript:window.navigator.registerProtocolHandler("mailto","https://www.example.com/squirrelmail/src/mailto_protocol_handler.php?uri=%s","SquirrelMail")

© 1999-2016 by The SquirrelMail Project Team