Send HTML Emails Using wp_mail and SMTP in WordPress

WordPress has its own email function for sending emails, i.e. wp_mail(). With wp_mail, you can send email as easily as in general PHP function: mail(). If you want to use extra information with the message, like From, CC, BCC, you can simply put those in $headers.

Source