这是发送邮件的代码:
$to = $_POST['leadEmail'];
$subject = "my subject";
$message = ( $_POST['leadEmailPref'] == "html" ) ? $messageh : $messagep ;
$headers[] = "From: My Name <ny_name@gmail.com>";
$headers[] = "Content-type: ".$_POST['leadEmailPref'] ;
wp_mail( $to, $subject, $message, $headers );
当我转到我的收件箱时,邮件作为附件发送,我看不到该邮件。显然我不想要附件,我希望收到电子邮件的人立即看到邮件。