patchphpGroupWare - Patches: patch #3054, how to get phpgw to act as default...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #3054: how to get phpgw to act as default email program for linux

Submitter:  Johnson <jecinc>
Submitted:  Fri 14 May 2004 03:08:26 AM UTC
   
 
Category:  email Priority:  1 - Later
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Wed 09 Jun 2004 03:47:11 PM UTC, comment #2: 

From the howto at: http://gnome-hacks.jodrell.net/hacks.html?id=11

using Gnome >= 2.2.2 add the following
protocol handler:
(on Fedora in Preferences, Control Panel, File Types)
Add Service under 'Internet Services' and create a new service as
follows:

Description: Mailto Handler
Protocol:    mailto
Program:     yournewscript.sh "%s"

Now it should work.

Johnson <jecinc>
Wed 09 Jun 2004 02:40:35 PM UTC, comment #1: 

In KDE, you set the email client by going to kcontrol (Preferences, Control Panel in Fedora), click on KDE Components amd set it to your script

Make sure you chmod the script +x so you can execute it.

Johnson <jecinc>
Fri 14 May 2004 03:08:26 AM UTC, original submission:  

This was already available to windows systems thanks to cw

It now works with gnome and phpgw 0.9.16 (and likely kde)

First you need to get the home.php from the HEAD branch.  You can download it here .. http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/phpgroupware/phpgroupware/home.php?rev=1.16.2.1.2.5

Next you need to modify your email/inc/bocompose.inc.php.
change (around line 660):
                                if ($mailto)
                                {
                                        $to_box_value = substr($mailto, 7,
strlen($mailto));
                                }


to:
                                if ($mailto)
                                {
                                        $array=parse_url($mailto);
                                        $to_box_value = $array['path'];
                                        parse_str($array['query']);
                                }

Next you use this bash script.
#!/bin/sh
                                                                               
                             
# use a phpgw web mail as a mailto handler
#
# In fedora, go to Menu, Preferences, File Types and Programs
# click on internet and then "Add a service"
# in the run box fill in this script's filename (and path) and then "%s"
# (like /home/scripts/phpgwmailto.sh "%s")
# (there might be a similar way in KDE)
# then edit this file to change the path to galeon (might also work with other
browsers)
# also change the url to your phpgw install

process=`echo $1 | sed 's/%/%25/g
s/ /%20/g
s/      /%09/g
s/!/%21/g
s/"/%22/g
s/#/%23/g
s/\\$/%24/g
s/\&/%26/g
s/'\''/%27/g
s/(/%28/g
s/)/%29/g
s/\*/%2a/g
s/+/%2b/g
s/,/%2c/g
s/-/%2d/g
s/\./%2e/g
s/\//%2f/g
s/:/%3a/g
s/;/%3b/g
s/</%3c/g
s/\=/%3d/g
s/>/%3e/g
s/?/%3f/g
s/@/%40/g
s/\[/%5b/g
s/\\\/%5c/g
s/\]/%5d/g
s/\^/%5e/g
s/_/%5f/g
s/\`/%60/g
s/{/%7b/g
s/|/%7c/g
s/}/%7d/g
s/~/%7e/g'`

/usr/bin/galeon
"http://your.domain.com/phpgroupware/login.php?phpgw_forward=/index.php&phpgw_m
enuaction=email.uicompose.compose&phpgw_mailto=$process"

exit 1


Johnson <jecinc>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code