wc_mail( mixed $to, mixed $subject, mixed $message, string $headers = "Content-Type: text/htmlrn", string $attachments = '' )

Send HTML emails from WooCommerce.


Description Description


Parameters Parameters

$to

(Required) Receiver.

$subject

(Required) Subject.

$message

(Required) Message.

$headers

(Optional) Headers. (default: "Content-Type: text/htmlrn").

Default value: "Content-Type: text/htmlrn"

$attachments

(Optional) Attachments. (default: "").

Default value: ''


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/wc-core-functions.php

function wc_mail( $to, $subject, $message, $headers = "Content-Type: text/html\r\n", $attachments = '' ) {
	$mailer = WC()->mailer();

	return $mailer->send( $to, $subject, $message, $headers, $attachments );
}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.