PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

网上找到的两个PHP发送邮件的例子,很不错,贴出来给初学者参考吧不知道是否有兄弟曾贴过,呵呵2

原创
2016-06-13 10:26:35 512浏览

Advanced Example Here we will show the full capabilities of the PHP mail function. PHP Code:

"; $recipient = "Kris Arndt ,npl@nucleus.com"; $subject = "Testing the mail function"; $message = "Hello! This is the body of the message. "; $extra = "From: kris@phpworld.com Reply-To: karn@nucleus.com "; mail ($recipient, $subject, $message, $extra); echo "Sending mail..."; echo "

"; ?> We send an email to two people this time, by putting two email addresses in the recipient field and separating them with commas. The fourth parameter holds extra headers for the email. We specify who the email was from and who the recipient should reply to. When entering multiple headers, separate them with the line feed and new line combination ( ).

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。