top of page

Send Mails from word press using wp_mail() with attachment

  • Writer: سُلَيْمَان بْن دَاوُوْد
    سُلَيْمَان بْن دَاوُوْد
  • Jun 5, 2020
  • 1 min read

define('WP_CONTENT_DIR', '/var/www/html/learning-hub/wp-content/');
$headers[] = 'Content-Type: text/html; charset=UTF-8';
$headers[] = 'From: Learning Hub <'.get_option('admin_email').'>' . "\r\n";
$attachments = array( WP_CONTENT_DIR .'/uploads/pdf/946.pdf' );
wp_mail( $customeremail, 'Learning Hub Order:'.$order_id,$messege,$headers,$attachments);


Recent Posts

See All
Hide Upcoming Events

Hiding Upcoming Events can be relatively useful when you are using ACF fields to show Dates for an an Event The Following Snippet is an...

 
 
 

Comments


© 2020 by syednazrulhassan

bottom of page