使用php写一个smtp发送QQ邮箱的示例
时间: 2023-03-14 16:28:35 浏览: 131
可以使用以下代码:<?php $to = "example@qq.com"; $subject = "Subject Line"; $message = "This is a test message."; $headers = "From: sender@example.com \r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; mail($to, $subject, $message, $headers); ?>
阅读全文