php - 我只想删除邮件标题中写的 via 和额外的东西
问题描述
$email = validate_input($_POST['email']);
$headers = "From: donotreply@xyz.co.nz"."\r\n". "CC: coach@xyz.co.nz"; $body = "Hi, Thank you for subscribing . Please find the link below for FREE 1 week course on Basic’s of Freestyle.\n\nwww.xyz.com/freecourse.php";
$body = wordwrap($body,70);
$mail = mail($email, "| Basic’s of Freestyle", $body,$headers);
解决方案
只需在标题后添加 -f 即可解决问题
$mail = mail($email, "| Basic’s of Freestyle", $body,$headers,'-fcoach@xyz.co.nz');
推荐阅读
- c# - 无法到达每个循环之外的变量
- c++ - 从外部类继承的 C++ 嵌套类;不允许不完整的类型
- php - 授权标头ajax获取令牌会话codeigniter
- macos - 在 Mac 应用程序菜单项中导航时,VoiceOver 焦点不会随键盘焦点移动
- python - 如何进行取决于参数化测试的测试。(Pytest)
- android - 将上下文作为存储库中的主要构造函数参数是好是坏
- python - 从 pandas 数据框列中获取括号周围的文本并将输出复制到同一列
- javascript - JS/React 函数返回字符串属性但返回 [object Object]
- apache-camel - Apache Camel onExceptionOccurred 组件未根据重新交付延迟重新交付
- amazon-web-services - 如何重定向/服务aws和我家的服务器之间的流量?