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 wordpress@yoursite.com. These may be overridden by including a header like:

From: "Example User" <email@example.com>

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