How to send an email with attachment in wordpress?

fms picture fms · Dec 29, 2010 · Viewed 27.3k times · Source

Now I can send an email without attachment :

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

But how can I send an email with attachment?

Answer

zod picture zod · Dec 29, 2010
 <?php wp_mail( $to, $subject, $message, $headers, $attachments ); ?> 

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