This should work:

if (mail($to, $subj, $bodytext)) {
echo "Mail send";
} else {
echo "... something go wrong: 
}

One tip: when configuring/installing php, if there is not /usr/bin/sendmail
it asumes that there is no way of send mails so mail function always return
false, check that just in case.

> So what do you get as the error message? Does it just return failed?
> Also, I think using parentheses with echo statements like yours is
> unnecessary.
> 
>> Keith Aldridge wrote:
>> New to php, can't see the problem with mail().
> 
>>
> 
> -- 
> Ashwin Purohit
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
            

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to