sendEmailWoocommerce

Performs sending CallbackScript executed Mail.

Description

sendEmailWoocommerce( $emailBody ); 

Parameters (1)

0. $emailbody
The emailBody.

Usage

  1. if ( !function_exists( 'sendEmailWoocommerce' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-payment-gateway-by-novalnet/callback_novalnet2woocommerce.php'; 
  3.  
  4. // The emailBody. 
  5. $emailbody = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = sendEmailWoocommerce($emailbody); 
  9.  

Defined (1)

The function is defined in the following location(s).

/callback_novalnet2woocommerce.php  
  1. function sendEmailWoocommerce( $emailBody ) { 
  2. global $lineBreak, $debug, $test, $emailFromAddr, $emailToAddr, $emailFromName, $emailToName, $emailSubject, $mailHost, $mailPort, $shopInfo; 
  3.  
  4. $headers = 'Content-Type: text/html; charset=iso-8859-1' . "\r\n"; 
  5. $headers .= 'From: ' . $emailFromAddr . "\r\n"; 
  6.  
  7. $emailSubject .= $shopInfo; 
  8. try { 
  9. if ( $debug ) { 
  10. echo __FUNCTION__ . ': Sending Email suceeded!' . $lineBreak; 
  11. wp_mail( $emailToAddr, $emailSubject, $emailBody, $headers ); # WordPress Sending Mail Function 
  12. catch ( Exception $e ) { 
  13. if ( $debug ) { echo 'Email sending failed: ' . $e->getMessage(); } 
  14. return false; 
  15. if ( $debug ) { 
  16. echo 'This text has been sent:' . $lineBreak . $emailBody; 
  17. return true;