Mail script not filling subject

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Mail script not filling subject

Post by RonnyK »

I used the "mail to friend" written in another post, but find the script not filling the subject-line with the data expected.

I created the following code in a UDT called "rk_mail":
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}

echo '';
and called it in a page using

Code: Select all

{rk_mail}
If I press the button in my template, outlook starts, but with an empty mail-screen.
julesdender
Forum Members
Forum Members
Posts: 13
Joined: Mon Jun 04, 2007 1:49 pm

Re: Mail script not filling subject

Post by julesdender »

You should use this:

<a href="mailto:?subject=I thought you\'d be interested...&body=I thought
Post Reply

Return to “CMSMS Core”