This topic is locked
[SOLVED]

 double quotes escape character

6/8/2019 5:15:51 AM
PHPRunner General questions
P
PaulM author

I'm trying to email a message that has a mailto in the message so the recipient can click on it to reply to an email. However the double quotes within the message stops it working.
$msg."<a href="mailto:daisy@somewhere.com?subject=Mail">EmailReply</a>";
I've tried to add the double quotes in decimal which allows the syntax checker to check it OK but it still doesn't work
$msg."<a href=&#34mailto:daisy@somewhere.com?subject=Mail&#34>EmailReply</a>";
I've also tried other escape characters such as \ but I can't get it working.
I would appreciate any help.

lefty 6/9/2019



I'm trying to email a message that has a mailto in the message so the recipient can click on it to reply to an email. However the double quotes within the message stops it working.
$msg."<a href="mailto:daisy@somewhere.com?subject=Mail">EmailReply</a>";
I've tried to add the double quotes in decimal which allows the syntax checker to check it OK but it still doesn't work
$msg."<a href=&#34mailto:daisy@somewhere.com?subject=Mail&#34>EmailReply</a>";
I've also tried other escape characters such as \ but I can't get it working.
I would appreciate any help.


This method is usually a browser setting in a number of browsers unless the user has it setup properly which probably not the case in most issues these days . I have hit that mailto: button numerous times in emails and nothing happens . Maybe Outlook but that's about it. Use
$msg= "This Message was auto generated from blablabla - To - Email : ".$values["."\r\n";
Or
$subject ="My subject message / Reply to [size="2"] : ".$values["[color="#ff0000"]emailreplytofield"]."\r\n";[/size]
Is what I use . Then not only do they have the email address in there with the correct email, the email client will have a better chance of picking it up to reply. This can be used in the body or subject line.
I have not used malito: function in years as it has not worked for me for awhile now . If you have to hardcode it then $ ="Daisy@Somewhere.com"; This is parto of PHPrunner Mail function and should be used like here for examples
This is why for instance the user to get your code working and was using chrome browser would have to do this
chrome://settings/handlersChrome Settings->Content Settings->Manage Handlers...

and set to mailto: open and that is just chrome . I think IE still will open but that is the only one . Not sure about IE EDGE.

admin 6/10/2019

You can use the combination of single and double quotes or escape quotes with \ character. Either one will work.

$msg."<a href='mailto:daisy@somewhere.com?subject=Mail'>EmailReply</a>";


or

$msg."<a href=\"mailto:daisy@somewhere.com?subject=Mail\">EmailReply</a>";
P
PaulM author 6/11/2019



You can use the combination of single and double quotes or escape quotes with \ character. Either one will work.

$msg."<a href='mailto:daisy@somewhere.com?subject=Mail'>EmailReply</a>";


or

$msg."<a href=\"mailto:daisy@somewhere.com?subject=Mail\">EmailReply</a>";



Thanks, that works perfect :-)