WC_Emails::send PHP Method

send() public method

Send the email.
public send ( mixed $to, mixed $subject, mixed $message, string $headers = "Content-Type: text/html ", string $attachments = "" ) : boolean
$to mixed
$subject mixed
$message mixed
$headers string (default: "Content-Type: text/html\r\n")
$attachments string (default: "")
return boolean
    public function send($to, $subject, $message, $headers = "Content-Type: text/html\r\n", $attachments = "")
    {
        // Send
        $email = new WC_Email();
        return $email->send($to, $subject, $message, $headers, $attachments);
    }

Usage Example

Example #1
0
 public function trigger($recipient, $subject, $content, $attachment = array())
 {
     /* global $woocommerce; */
     $mail = new WC_Emails();
     $email_heading = get_bloginfo('name');
     ob_start();
     $mail->email_header($email_heading);
     $message = ob_get_clean();
     $message .= $content;
     ob_start();
     $mail->email_footer();
     $message .= ob_get_clean();
     $mail->send($recipient, $subject, $message, "Content-Type: text/html\r\n", $attachment);
 }
All Usage Examples Of WC_Emails::send