Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#815562
Hi,

I create a template like this:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body>
<p dir="rtl">This is your data: </p>
<p dir="rtl"> @@your_number</p>
</body>
</html>
Then I want to send this data with PMFSendMessage function:
Code: Select all
<p dir="rtl" style="text-align: right;">test1</p> <p dir="rtl" style="text-align: right;">test2</p>
But this data not show correctly in email content.
How can I use html data with this function correctly?

Thanks
#815577
Programerboy, Let's say that you have this template file:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body>
<p dir="rtl">This is your data: </p>
@#data
</body>
Use @#data to insert the variable without quotation marks around it.

Then you can use this trigger code to send it as an email:
Code: Select all
$aVars = array(
    'data' => '<p dir="rtl" style="text-align: right;">test1</p> <p dir="rtl" style="text-align: right;">test2</p>'
);
//make sure that sending from the email account configured under Admin > Email Settings or many 
//email servers will consider it spam:
PMFSendMessage(@@APPLICATION, 'admin@myemail.com', 'to@somewhere.com', '', '', 
     'My test message', 'mytemplate.html', $aVars);
By the way, if @@data is already saved as a case variable in a previous trigger or Dynaform, then it isn't necessary to pass it in the variables parameter to PMFSendMessage().
#815587
Hi,
Thanks for your answer,

I do it but the program convert it to it when send email:
Code: Select all
<p align="right" dir="rtl">"<p dir=\"rtl\" style=\"text-align: right;\">test1</p>\r\n<p dir=\"rtl\" style=\"text-align: right;\">test2</p>"</p>
Therefore it not show correctly in mail content.
Thanks

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]