Sending HTML email with attachment with wp_mail()

Reference link click here.

Using below code you can send the mail with html format.

$to = '[email protected]';
$subject="The subject";
$body = 'The email body content';
$headers = array('Content-Type: text/html; charset=UTF-8');

wp_mail( $to, $subject, $body, $headers );

// For attachment 

$attachments = array( WP_CONTENT_DIR . '/uploads/file_to_attach.zip' );
$headers="From: My Name <[email protected]>" . "\r\n";

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