Mohammad Aghayari Mohammad Aghayari - 5 months ago 5
PHP Question

sending email on php

I have this code to send email.and I got no error in sending email.

echo 'meiled.';
}else {
die('not sent');
function mailSender() {
$to = '';
$subject = 'An Abstract Submitted';
$message = 'An Abstract Submitted Recently In';
$headers = '';
mail($to, $subject, $message, $headers);

it does not send email.

Fin Fin

Because the if expression evaluates a boolean, and mailSender() returns none.

Add this to your function:

return mail($to, $subject, $message, $headers);

For more information about see the php documentation: