Jump to content

Recommended Posts

Hi

 

I've created a php mail system which distributes email newsletters to 100's of our clients, within the newsletter there's a mailto link which works fine but the subject i'm trying to force isn't coming up properly, it's just the first word of the sentence that shows.

 

this is the code im using

 

<a href=mailto:info@email.co.uk?subject= 40% Funding enquiry>info@email.co.uk.</a>   

Also tried

<a href=mailto:info@email.co.uk?subject= 40%%20Funding%20enquiry>info@email.co.uk.</a>

 

but both return just 40% in the subject line in the email page,

anyone have any ideas/suggestions would be most appreciated

 

Thanks =]

Link to comment
https://forums.phpfreaks.com/topic/65070-solved-mailer-help-please/
Share on other sites

try placing double quotes around it like so:

 

<a href="mailto:info@email.co.uk?subject= 40% Funding enquiry">info@email.co.uk.</a>

 

thanks for the quick reply.

 

that's not possible to do with this mailer, there's a link parse file running along side so you don't have to enter the full HTML markup (i can post the code for this for a better understanding) so if i put the quotes in it stops the mailto from working  :-\.

 

but thanks for your input

appreciated :)

 

 

This is the link parse that stops me from doing simple HTML tags

 

 

<?php
//
// Parse text for links
//
// KNOWN BUGS
// the characters "/>" are added when a link is parsed after a line break
//
function parse($sample){

// constructors & declarations
$Ngram = array();
$text = nl2br($sample);

// split text in Ngrams
$Ngram = explode(" ", $text);
//$Ngram = preg_split( "/[ \n]+/", $text );
// perform search
for($i=0; $i<count($Ngram); $i++){
	//echo $Ngram[$i]."<br />";

	// check to see if Ngram is minimum web address length ie. www.xx.de
	if(strlen($Ngram[$i]) >= 9){

		// look for www.
		if(substr($Ngram[$i],0,4) == "www."){
			// clean up fullstops
			if(substr($Ngram[$i],-1,1) == "."){
				$length = strlen($Ngram[$i])- 1;
				$Ngram[$i] = substr($Ngram[$i],0,$length);
			}
			// strip html tags
			$Ngram[$i] = strip_tags($Ngram[$i]);

			// convert to hyperlink
			$tmp = "<a href=\"http://" . $Ngram[$i] . "\" target=\"_BLANK\">" . $Ngram[$i] . "</a>";
			$Ngram[$i] = $tmp;
		} // end IF

	} // end IF

} // end FOR

// re-assemble the text
for($i=0; $i<count($Ngram); $i++){

	$parsed .= $Ngram[$i] . " ";
} // end FOR

// return parsed text
return $parsed;
}

?>  

 

This???

 

 

<a href=mailto:info@email.co.uk?subject=%2040%%20Funding%20enquiry>info@email.co.uk.</a>

 

no :-\ still just the 40% in the subject header ,

Thanks though

 

:)

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.