Mohammad Aghayari Mohammad Aghayari - 2 years ago 83
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
Answer Source

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:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download