格式化PHP邮件参数

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了格式化PHP邮件参数相关的知识,希望对你有一定的参考价值。

The right way to send a mail with POST params
  1. if( isset( $_POST['name'] ) &&
  2. isset( $_POST['email'] ) &&
  3. isset( $_POST['subject'] ) &&
  4. isset( $_POST['message'] ) ) {
  5.  
  6. $to = 'Jon <[email protected]>';
  7.  
  8. mail($to, strip_tags( $_POST['subject'] ), stripslashes( utf8_decode( strip_tags( $_POST['message'] ) ) ), 'From: '.strip_tags( $_POST['name'] ).'<'.$_POST['email'].'>' );
  9. }

以上是关于格式化PHP邮件参数的主要内容,如果未能解决你的问题,请参考以下文章