Author Topic: Mailto Handler Custom URL  (Read 2976 times)

Offline aiwebsystems

  • Newbie
  • *
  • Posts: 8
Mailto Handler Custom URL
« on: September 02, 2012, 06:47:52 PM »
Is there any way I can modify the URL used by the mailto protocol handler? I would like to keep the URI, but set a different URL (instead of the app path).

Good stuff, keep up the great work!

Thanks!

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Mailto Handler Custom URL
« Reply #1 on: September 03, 2012, 01:30:54 AM »
I'm not sure what your asking for, do you want to regster the mailto: links to point to a different domain?

Offline aiwebsystems

  • Newbie
  • *
  • Posts: 8
Re: Mailto Handler Custom URL
« Reply #2 on: September 03, 2012, 02:44:46 AM »
Thanks for the reply!

Here's what I am doing. I have a multisite CMS that uses RC as a webmail module - it's displayed within an iframe and styled to match and all.

The app resides at example.com/system/shared/stuff/modules/webmail

The users access it this way though - example.com/admin/webmail and an iframe pulls in the URL above all the same. I do this to keep the CMS UI in tact.

I want to point the mailto protocol handler so that it points to the second URL (same URi) instead of the apps default (install) path. This way I can grab the variables and pass them into the iframe manually. This would let me accomplish the same thing, but keeps the surrounding CMS stuff in tact.

From: http://domain.com/addons/modules/webmail/src/?_task=mail&_id=67165765464646546541&_action=compose

To: http://domain.com/admin/webmail/?_task=mail&_id=67165765464646546541&_action=compose


Thanks a ton!

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Mailto Handler Custom URL
« Reply #3 on: September 06, 2012, 04:40:29 AM »
Sorry for the delay in my response, I see why you would want to change the base url but there isn't a built in way to do it. There is only two options to change the base url:
1. Edit RoundCube's core code
2. Create a plugin

I'd recommend going with the second so you wouldn't have to edit the core code after every upgrade although it would be a bit more work upfront.