我有此代码可以发布联系表:
$pp = new FormHandler();
$validator = $pp->getValidator();
$validator->fields(['name','phone'])->areRequired()->maxLength(50);
$validator->field('email')->isEmail();
$validator->field('msg')->maxLength(6000);
$pp->sendEmailTo(''); // ← Your email here
echo $pp->process($_POST);
如何添加field('email')
(即在联系人表单的电子邮件输入字段中输入的那个)作为“发送电子邮件至”。有人可以帮我吗?
答案 0 :(得分:1)
您是说
$pp->sendEmailTo($_POST['email']);