Jump to content

Email the page function adds + in between each word


craigtolputt

Recommended Posts

Hi All,

 

I have a script that i bought and a part of it has a share icon with an email icon so if the user clicks the email icon then it opens up your email client and adds the details of the deal to the email.

 

The problem is that it seems to break each word up by placing a + between them.

 

So for example you get this...

 

Come+and+check+out+Welcome+to+theSocialDeal,+they+have+this+great+local+deal,+if+we+all+buy+it+then+we+get+it+cheaper!

Today's+Deal:+4+hours+of+extreme+MTB+action+at+John+Doe+Extreme+Trail+Centre+for+the+price+of+1+hour

Click+this+link+to+check+it+out:+

 

 

which should be this...

 

Come and check out Welcome to theSocialDeal, they have this great local deal, if we all buy it then we get it cheaper!

Today's Deal: 4 hours of extreme MTB action at John Doe Extreme Trail Centre for the price of 1 hour

Click this link to check it out:

 

Here is the php function, does anyone know what this could be and how i can stop it?

 

function share_mail($team) {
global $login_user_id;
global $INI;
if (!$team) {
	$team = array(
			'title' => $INI['system']['sitename'] . '(' . $INI['system']['wwwprefix'] . ')',
			);
}
$pre[] = "Come and check out {$INI['system']['sitename']}, they have this great local deal, if we all buy it then we get it cheaper!";
if ( $team['id'] ) {
	$pre[] = "Today's Deal: {$team['title']}";
	$pre[] = "Click this link to check it out: ";
	$pre[] = $INI['system']['wwwprefix'] . "/team.php?id={$team['id']}&r={$login_user_id}";
	$pre = mb_convert_encoding(join("\n\n", $pre), 'UTF-8', 'UTF-8');
	$sub = "The Deal: {$team['title']}";
} else {
	$sub = $pre[] = $team['title'];
}
$sub = mb_convert_encoding($sub, 'UTF-8', 'UTF-8');
$query = array( 'subject' => $sub, 'body' => $pre, );
$query = http_build_query($query);
return 'mailto:?'.$query;
}

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.