阅读有关使用 SMTP 的基本示例
并查看此内容
这样做
$sub = $formname.'-'.$inquirytype;
$mail->Subject = $sub;
添加body
文本使用
$mail->Body = 'I'm Body text';
基本使用
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "mail.yourdomain.com"; // sets the SMTP server
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Username = "yourname@yourdomain"; // SMTP account username
$mail->Password = "yourpassword"; // SMTP account password
$mail->SetFrom('name@yourdomain.com', 'First Last');
$mail->AddReplyTo("name@yourdomain.com","First Last");
$mail->Subject = "PHPMailer Test Subject via smtp, basic wi