wp_mail() is a wraper function avaliable in wordpress core that can send emails. You can use wp_mail() to send emails from wordpress/woocommerce plugins and themes.

function devnodes_send_email($message)
{
  // True because $a is empty
  if (empty($message)) {
    $message = 'This is the body message';
  }
  //to address
  $to = '[email protected]';
  $headers = 'From: Devnodes.in <[email protected]>' . '\r\n';
  $subject = 'Sending Message using wp_mail function';

  //now call wp_mail() function to send the message
  //when the email was sent successfully wp_mail() will return true.
  return wp_mail($to, $subject, $message, $headers);
}