简体   繁体   English

使用php发送电子邮件

[英]send email using php

How do I know if my host is allowing me to send emails using PHP mail() function? 我怎么知道我的主机是否允许我使用PHP mail()函数发送电子邮件?

Is that possible to check with phpinfo() output? 有可能检查phpinfo()输出吗?

IS that possible to check with phpinfo() output? 是否可以通过phpinfo()输出进行检查?

Not always, and not reliably. 并非总是如此,也不可靠。 But why not simply try out? 但是为什么不简单地尝试一下呢?

mail("youraddress@domain.com", "Test subject", "Test body");

您可以检查phpinfo()但我建议尝试

mail("me@me.com", 'Subject', 'Test Body', "From: from@me.com");

You can fsock open on the mail server's port also. 您也可以在邮件服务器的端口上打开fsock。 This is playing on nightmare mode however. 但是,这是在噩梦模式下播放的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM