wordpress send email – wp_mail

<?php
   $attachments = array( WP_CONTENT_DIR . '/uploads/file_to_attach.zip' );

   $headers[] = 'From: My Name <[email protected]>';
   $headers[] = "Content-type: text/html" ;

   wp_mail('[email protected]', 'subject', 'message', $headers, $attachments );

?>

 

 

 

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

Author: bm on July 17, 2014
Category: wordpress

Your comment:

Your Name

Comment:




Last articles