编辑电子邮件wordpress发送

时间:2017-09-22 20:48:56

标签: html wordpress email

我在用户登录的页面上有一个时间输入电子邮件布局,并将提交工作时间。当我收到要发送的电子邮件时,它会像这样进入

{“action”:”ls_time_entry”,”origin”:”174″,”dateEntry”:””,”startTime”:””,”endTime”:””,”Staff”:”Y292DA7423A6E933″,”Matter”:”A6D67A7928CF5527″,”Discount_Note”:””,”Description”:””}

如何让它显示如下或至少接近这个:

Date:
Start Time:
End Time:
Staff:
Matter:
Discount Note:
Description:

1 个答案:

答案 0 :(得分:0)

试试这个,替换第34行:

Map.merge

 ** (BadMapError) expected a map, got: [username: "max"]
 stacktrace:
   (stdlib) :maps.merge(%{name: "Some User", password: "supersecret", username: "user19DA79B623406098"}, [username: "max"])

我们的想法是使用$ _POST来获取单个值而不是JSON格式

你可以使用 br / n 添加行返回(如果br不起作用)

$message = $json;

$message = "Date: ".$_POST['dateEntry']." Start Time: ".$_POST['startTime']. " End Time: ".$_POST['endTime']." Staff: ".$_POST['Staff']." Matter: ".$_POST['Matter']." Discount Note: ".$_POST['Discount_Note']." Description: ".$_POST['Description'];