[英]Send mail from PHP with minimum 3rd party services?
Dont ignore if this sounds like a duplicate. 如果这听起来像是重复,请不要忽略。 I went through similar questions here but couldnt resolve my doubts.
我在这里遇到了类似的问题,但无法解决我的疑虑。
Im developing a site in my localhost. 我在我的localhost中开发一个站点。 Its coded in PHP.
它用PHP编码。 I need to send mail to my site's customers from my PHP script.
我需要从我的PHP脚本向我网站的客户发送邮件。 I know we can use gmail smtp server for this.
我知道我们可以使用gmail smtp服务器。 But due to the limit on the mail/day set by google, i prefer not to use them.
但由于谷歌设定的邮件/日限制,我不想使用它们。
But my doubts are: 但我怀疑的是:
Thanks a lot! 非常感谢!
EDIT: Im using wamp2.2 in my localhost. 编辑:我在我的localhost中使用wamp2.2。
If you use XAMPP, it comes with Mercury Mail. 如果你使用XAMPP,它会附带Mercury Mail。 You can use that to send mails through localhost.
您可以使用它通过localhost发送邮件。
sendMail
could be sendmail
, which is itself a MTA-interface. sendMail
可以是sendmail
,它本身就是一个MTA接口。 to send email from php , simply use php's own mail function : 从php发送电子邮件,只需使用php自己的邮件功能:
<?php
$to = "destinationemailid";
$subject = "mail subject";
$message = "your message to send";
$from = "sourceemailid";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
?>
this works with xampp on localhost 这适用于localhost上的xampp
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.