joomla mailto component

My developer has developed this new page on my new joomla site (  We are working on fixing what happens when you press the forward to friend button which uses the mailto component.

cwg says: in other words, we want to change the content of email sent from the site when the email icon is clicked by a user.

The unwanted result is below.  I want to format the email such that all it displays is a "link" containing the title of the article and nothing more.  Ideally, I'd like the sender to be able to edit the existing outgoing message containing this link as well, and be able to do this from inside the same dialog where they put the users email address.

Unwanted Result:
This is an e-mail from ( sent by name of fwd sender ( You may also find the following link interesting: 

cwg says: I'm modifying the code in the mailto component's controller.php to create a prettier email. I tried 4 different sharing or email extensions to joomla and none of them had this functionality so I have resorted to changing core which I really don't like to do. Right now I'm having a hard time figuring out how to get the title of the article, and once I solve that I need to figure out how to make it into a pretty link. Any suggestions appreciated muchly.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Open the file controller.php in components/com_mailto

search for:
// Build the message to send
            $msg      = JText :: _('EMAIL_MSG');
            $body      = sprintf( $msg, $SiteName, $sender, $from, $link);

Change it to:
// Build the message to send
            $msg      = JText :: _('EMAIL_MSG');
            $body      = sprintf( $link);

In the email you will find now only the Link to the article
rtod2Author Commented:
CWG says:

Pekabo, I've gone way past that already, as I think my editing of Ted's initial request might have told you. I've got a new, nicely formatted email message now, once i figured out how to do the line breaks using sprintf. BUT I can't figure out where to get the TITLE that is associated with the linked message. I spent several hours on this yesterday looking for a way to use the link in order to get the title. but so far I have gotten nowhere. I'm pretty sure I know how to extract the url part of the existing link and use that plus the title to make a nice looking link for the email.

If I hadn't already identified the file that constructed the message your tip might have been helpful, but I had included that information in the original question. Clearly we need more help--specifically, how, from the context of the mailto component, can I get the title of the article that is being sent? Thanks.
maybee this will help
$params->get( 'page_title')
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

rtod2Author Commented:
cwg says: That's the idea for what I want. Unfortunately that just makes the routine go away...without sending email. Probably there is no appropriate context for $params inside the component's controller...

something else i tried, that also failed, was:
$doc      =& JFactory::getDocument();

also, note that $link is set by:
$link             = base64_decode( JRequest::getVar( 'link', '', 'post', 'base64' ) );

so I tried
$title= JRequest::getVar ('title', '', 'post', 'text');

That didn't work either. Thanks--hope you'll spot something.
rtod2Author Commented:
We need to write-up our solution here.  This was incredibly hard to do.  We finally got it.
rtod2Author Commented:
The concept: Create an index page andarticle pages for each of a group of articles that are suitable forforwarding to friends.  The project was implemented as part ofan existing joomla site, at /fwdindex.
  • A new section and category were      created, each with the name 'forwards'.
  • Alphacontent extension was used to      create the index page.
  • The following customizations were      made:
    • components/com_mailto
      • controller.php                  was modified to create a 'prettier' email. This required getting                  an additional hidden form item: title.
      • views/mailto/tmpl/default.php                  was modified to handle the new form item, title. It was set to                  copy the 'link' to 'title' in the case where title was not                  initialized.
      • view/mailto/view.html.php                  was modified to initialize the new form item from the newly                  redefined url request. (&title=xxxx added to url)
    • components/com_alphacontent
      • views/alphacontent/tmpl/default.php                  was modified to create a special 'forward to friend' link next to                  each article being indexed. The url associated with the link has                  the title of the article as well as a link to the actual article,                  not to the index page.
    • components/com_content
      • helpers/icon.php                  was modified to detect the 'forwards section' and treat it as a                  special case. For that section a special 'backlink' to the index                  page is created, and a special version of the email link is                  generated, using a fancy 'forward' button and with the special url                  that has title as well as link to the current page.
The title and link arguments passed viaurl are encoded in base64.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.