THT Community
Email was not sent out! - Printable Version

+- THT Community (https://thehostingtool.com/forum)
+-- Forum: THT Support (https://thehostingtool.com/forum/forum-7.html)
+--- Forum: Reworked (https://thehostingtool.com/forum/forum-46.html)
+--- Thread: Email was not sent out! (/thread-1899.html)



Email was not sent out! - Fakher - 08-14-2012

Hi all,
My THT installation is not sending out any email using PHP Mail funtion. When i try to send an email to a user it says "Email was not sent out!"

I am using latest THH v1.3.5.

Can someone please guide me on this?
I tested my mail () function and its working... Any idea?
PHP Code:
<?php

$to 
"[email protected]";
$header "From: {$to}";
$subject "Hi!";
$body "Hi,\n\nHow are you?";
if (
mail($to$subject$body$header)) {
echo(
"<p>Message successfully sent!</p>");
} else {
echo(
"<p>Message delivery failed...</p>");
}


if ( 
function_exists'mail' ) )
{
    echo 
'mail() is available';
}
else
{
    echo 
'mail() has been disabled';
}  

?>

I am using vBulletin to send emails and it working quite smoothly but i don't why its working with THT.

Regards
Fakher


RE: Email was not sent out! - Liam D. - 08-15-2012

Hello.

Are you using PHP Mail() for THT, or are you using the SMTP (PEAR) option?


RE: Email was not sent out! - Fakher - 08-15-2012

At the moment i am using SMTP option for emails. But i want to fix PHP Mail().


RE: Email was not sent out! - Liam D. - 08-17-2012

Check your "From" e-mail field. You might have mistyped anything that included an invalid character.


RE: Email was not sent out! - Fakher - 08-17-2012

i double checked it nothing wrong Sad still can't send the emails out


RE: Email was not sent out! - Fakher - 08-18-2012

my sendmail path is
Quote:/usr/sbin/sendmail
is it ok?


RE: Email was not sent out! - Liam D. - 08-20-2012

If you can use the SMTP (PEAR) option fine, then just use it until someone else gives you insight. I'm sorry but I have no idea what the problem is here. :S


RE: Email was not sent out! - Fakher - 08-20-2012

Sad ok anyone else can help me then Sad ?


RE: Email was not sent out! - Jonny - 08-21-2012

The test you mentioned in OP won't test your email functionality using SMTP.

If Mail() is working on your server, why don't you just use that?


RE: Email was not sent out! - Fakher - 08-21-2012

PHP Mail() is not working for THT it works for vB forum but not for THT as mentioned earlier THT gives an error

"Email was not sent out!"

Now i am using SMTP to send emails in THT, but my question was why mails are not being sent out through THT (selecting PHP Mail) if PHP Mail () Function is working fine on my server?