Search code examples
phpwordpressemail-attachments

How to send an email with attachment in wordpress?


Now I can send an email without attachment :

wp_mail( $to, $subject, $message, $headers);

But how can I send an email with attachment?


Solution

  •  <?php wp_mail( $to, $subject, $message, $headers, $attachments ); ?> 
    

    http://codex.wordpress.org/Function_Reference/wp_mail