
[英]Can i use SendGrid to receive email from different addresses with my own domain/subdomain
[英]How can I send email using a “from” address different from my own domain? [closed]
$to = "email@anydomain.org";
$subject = "My subject";
$txt = "Hello world! there";
$headers = "From: email@anotherdomain.org" . "\r\n" .
"CC: email@gmail.com";
mail($to,$subject,$txt,$headers);
上面的代码在 From: myemail@mydomain.com 时有效,但如果我使用另一个域从我的数据库中提供一个地址的发件人地址,则它不起作用。 它有解决方法吗? 我已经阅读了一些关于 PHPMailer 和 SwiftMailer 的内容。 他们需要安装吗? 我与 Godaddy 一起主持。 有什么建议么?
谢谢你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.