本文由www.nilst.com整理,欢迎转载 php使用mail函数来发送邮件. mail -- send mail 格式: bool mail ( "地址", "主题", "内容",[其它邮件扩展头信息],...) 发送成功返回true,否则返回false. 需要注意的是即使返回true也不能说明对方会收得到邮件。 例子1. 例子 2. Sending mail with extra headers. 例子3. 例子 4. Sending complex email. Birthday Reminders for August

Here are the birthdays upcoming in August!

PersonDayMonthYear
Joe3rdAugust1970
Sally17thAugust1973
'; /* To send HTML mail, you can set the Content-type header. */ $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; /* additional headers */ $headers .= "To: Mary , Kelly \r\n"; $headers .= "From: Birthday Reminder \r\n"; $headers .= "Cc: birthdayarchive@example.com\r\n"; $headers .= "Bcc: birthdaycheck@example.com\r\n"; /* and now mail it */ mail($to, $subject, $message, $headers); ?> 注意事项: 1.确保主题部分不能有换行,否则邮件可能不能正确传输. 2.接收人地址不能采用"Something "的格式, 只能使用"someone@example.com"的格式.