Category Covered

PHP Mail function in wordpress

Use the following line to send mail in wordpress
<?php wp_mail( $to, $subject, $message, $headers, $attachments ); ?>

The default sender name is "WordPress" and the default sender email address is These may be overridden by including a header like:

From: "Example User" <>

Change it otherwise it may skip the inbox and move to spam.