Author Topic: Mailto link opening roundcube  (Read 19387 times)

Offline Pieter

  • Newbie
  • *
  • Posts: 9
Mailto link opening roundcube
« on: February 09, 2007, 04:51:29 AM »
Is it possible to get mailto-links on webpages to open a roundcube mail compose window?

Offline Hickman

  • Newbie
  • *
  • Posts: 3
Re: Mailto link opening roundcube
« Reply #1 on: March 05, 2007, 11:35:12 AM »
Browser-based mailto links pull from the user's default mail client on their machine. The browser knows this information and therefore activates the program upon clicking a mailto link for the user's default mail client. I can say that I am nearly 100% confident this is not possible.

Offline Pieter

  • Newbie
  • *
  • Posts: 9
Re: Mailto link opening roundcube
« Reply #2 on: March 05, 2007, 01:22:31 PM »
I found it actually is possible (in Firefox at least) using the webmailcompose extension.

Offline Cutsie

  • Jr. Member
  • **
  • Posts: 21
Re: Mailto link opening roundcube
« Reply #3 on: March 07, 2007, 11:43:54 AM »
It IS possible - Yahoo! Web-based e-mail uses this. All you have to do is download a little file they have onto your computer and whenever you click on a mailto link, a new browser window with your Yahoo! Webmail opens and the "to" and "subject" (if specified in the link) fields are filled out (if you are already logged into your Yahoo! mail account, of course - otherwise it will just take you to the login screen).

Offline oxygens

  • Jr. Member
  • **
  • Posts: 36
Re: Mailto link opening roundcube
« Reply #4 on: March 07, 2007, 01:57:03 PM »
gmail does a similar thing but this would require roundcube to create a desktop applet, i don't believe they have any plans for this at present.

Offline clintox

  • Newbie
  • *
  • Posts: 7
Re: Mailto link opening roundcube
« Reply #5 on: March 23, 2007, 02:56:39 PM »
WebMailCompose works with Firefox if you apply my patch below. First, get WebMailCompose for FF2.0 and install it: http://sas.sparklingstudios.com/articles/read/how-to-install-webmailcompose-in-firefox-2-0

Save the patch below to roundcubemail/program/steps/mail/webmailcompose.diff

Run the patch:
# patch -p0 < webmailcompose.diff

The patch:
Code: [Select]
--- compose.inc.orig  2007-03-23 11:23:44.000000000 -0700
+++ compose.inc 2007-03-23 11:16:44.000000000 -0700
@@ -365,3 +365,7 @@

- $body = '';
+ //webmailcompose
+ if (isset($_GET['_message']))
+  $body = $_GET['_message'];
+ else
+  $body = '';

@@ -632,4 +636,7 @@

+ //webmailcompose
+ if (isset($_GET['_subject']))
+  $subject = $_GET['_subject'];
  // use subject from post
- if (isset($_POST['_subject']))
+ else if (isset($_POST['_subject']))
   $subject = get_input_value('_subject', RCUBE_INPUT_POST, TRUE);


Go into the options for the WebMailCompose extension.

Go to the WebMail Services tab and check Enable Other.

Paste the line below into the Enable Other field:
Code: [Select]
http://YOUR_ROUNDCUBE_URL/?_task=mail&_action=compose&_to=^T&_subject=^S&_message=^M
You should now be able to right click on a webpage and select Send Link. This should compose a new Roundcube email with the page title as the subject line and a link to the page as the message body.

NOTE: You must already be logged into Roundcube for this to work.

Offline stib

  • Jr. Member
  • **
  • Posts: 14
Mailto link opening roundcube
« Reply #6 on: April 22, 2009, 11:51:27 AM »
I did it with a FF plugin called mailfrom. By default it only has gmail, yahoo and the system, but with a bit of hacking of about:config I got it to open my roundcube webmail.

Once you've installed mailfrom, open a tab and in the address bar write about:config
do a search for "mailfrom" and you should see a bunch of settings. You need to copy the settings for the existing services, and adapt them for your roundcube setup.

so there's four settings that you need to change
the first is
extensions.mailfrom.services
Just double click on it and add a name for your webmail service. You can also delete any ones you don't need. The value I set was
default,gmail,roundcube
note the lack of spaces after the commas.

So now you've set up the service, you need to specify a name, a URL and whether it's enabled.

Create a new boolean (right click on the left and choose it from the list) called
extensions.mailfrom.service.roundcube.enabled
Set the value of this to true.

then create a new string. This sets the name that you want to appear to the user. Call it:
extensions.mailfrom.service.roundcube.name
set the value of this to whatever you like, I called mine "roundcube". Creative huh?

then lastly we need to specify the URL. First find the URL of your Roundcube compose page (this is easy, click the compose button in your roundcube page and copy the URL in the page that comes up). To get mailto links to properly supply the values for the to: and subject: etc fields you have to add the following to the end of the URL
&_to=$TO&_subject=$SUBJECT&_message=$BODY

so it will look like:
http://yourdomain.com/path/to/roundcube/?_task=mail&_action=compose&_to=$TO&_subject=$SUBJECT&_message=$BODY
replace the red bits with the address that you copied from the compose page.

Put that URL in a text editor or whatever so that you can copy it into the next key we create. This is another string and it should be called
extensions.mailfrom.service.roundcube.url
create that key, copy over your URL and you're good to go. You might have to restart Firefox. Once you've done that open the preferences for the mailfrom plugin and you should see roundcube in the list of services. select it and hit the default button, and now when you click on a mailto link it will open in roundcube.

HTH

-stib
« Last Edit: April 22, 2009, 12:01:36 PM by stib »

Offline Ezz

  • Jr. Member
  • **
  • Posts: 19
Mailto link opening roundcube
« Reply #7 on: April 27, 2009, 11:23:46 AM »
[Sorry for my bad english]

Does somebody know how i can use this funktion ... but with the "POST" type - not with "GET" ??

I hope someone has an answer for me!

Thanks!!

Ezz

//

I want to get the "BCC" contacts by "POST" data to RC.


Offline snugthejoiner

  • Newbie
  • *
  • Posts: 1
Mailto link opening roundcube
« Reply #9 on: October 24, 2009, 07:12:09 AM »
Fantastic! Stib's post did the trick. Much appreciated. Worked like a charm.