1

I'm searching for an hour and my problem is this :

I have the following code :

 //This is an absolute path
 $attachments = array( $path );
 $headers = 'From: My Name <'.$email_expediteur.'>' . "\r\n";

 if(wp_mail($email_expediteur,'Daily Report',$message_texte,$headers,$attachments))
 {
      echo 'Mail was sent to  '.$email_expediteur.'<br/>';
      unlink($path);
 }
 else
 {
      echo 'mail failed...';
 }

Then I recieve no mail despite Mail was sent. But when I set $headers to an empty string or empty array, the encoded attachement shows in the message and the mail starts with

--b1_04eea9e256980b72f460839984509e98
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

So I don't understand what's going on ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.