XF 1.5 No email received for password and registration

Pavle123

Active member
Hi,

After switching to a SiteGround hosting, my users are unable to retrieve their password via the email.

However when I send a normal email to that very same email used for password retrieval, it works.

Any idea what is wrong?

Thanks in advance.
 
Are there any errors in the XF server error log in the control panel? If not, that would imply the email was handed off to the mail handler/server so XF isn't involved. The server's mail log would have further details. Your host will need to access that for you normally (as it requires root access).
 
Hi @Mike

I see these errors :
I also changed a email to gmail inside |Options|Email|Default Email Address
instead of a @domain name, problem persists. Users can not retrieve passwords nor register, as there is no confirmation link/reset link or anything, email does not arrive.

"...failed: Unable to send mail. - library/Zend/Mail/Transport/Sendmail.php:137"
photo.webp

I see couple of these errors, but when I try to retrieve a password, I do not see anything in error logs.

Any idea what might be the problem?
 
Last edited:
@Pavle123 Im getting the exact same errors.

Still haven't found a solution but the common denominator could be the change of server. My problems started when I changed server.

By any chance did your hosting change from PHP 1.54 to PHP 1.56?

As an aside my php send mail is working on a test programme but not in Xenforo. No one really knows the answer.
 
@Shane Greer I changed my hosting 2 days ago. I am on SiteGround, according to phpinfo its PHP Version 5.4.45

Just checked, and my php error log says this (full with errors like these)
[20-Oct-2015 17:17:03 CST6CDT] PHP Fatal error: require(): Failed opening required '/home/public_html/forums.domain.com/library/XenForo/Autoloader.php' (include_path='.:/usr/local/php54/pear') in /home/public_html/forums.domain.com/index.php on line 6

Seams like a php conflict/error of some sort.
 
I am not on SSL. I am on shared.
Have you contacted your host to confirm that you can use the PHP sendmail option? Some hosts will not allow it and require all mail to process via SMTP connections.
I don't deal much with shared hosting any longer, since a lot of the configuration controls are out of your hands and left up to the hosting provider.

To check to see if it (php sendmail) is working, they give a sample PHP page you can try using - you will need to change the email address in it to reflect a valid email you can receive.
Code:
<?php
function spamcheck($field)
{
//filter_var() sanitizes the e-mail address that is inserted
// The FILTER_SANITIZE_EMAIL filter removes all forbidden e-mail characters from the inserted string $field=filter_var($field, FILTER_SANITIZE_EMAIL);

//filter_var() validates the e-mail address that is inserted
// The FILTER_VALIDATE_EMAIL filter validates the value of the text inserted as an e-mail address
if(filter_var($field, FILTER_VALIDATE_EMAIL))
{
return TRUE;
}
else
{
return FALSE;
}
}

if (isset($_REQUEST['email']))
{//this is a simple check that makes sure the email field not empty

//this is the check that uses the validation function to ensure the email address is valid
$mailcheck = spamcheck($_REQUEST['email']);
if ($mailcheck==FALSE)
{
echo "You have inserted incorrect email address or have left some of the fields empty";
}
else
{//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail("test@siteground.com", "Subject: $subject",
$message, "From: $email" );
echo "Thank you for using our mail form! We will get in touch with you soon!";
}
}
else
{//if the "email" field is not filled out the form itself will be displayed.
echo "<form method='post' action='contact.php'>
Email: <input name='email' type='text' /><br />
Subject: <input name='subject' type='text' /><br />
Message:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='submit' />
</form>";
}
?>
 
Great idea Tracy. I will test it out, I already created a ticket with my provider, so will let you guys know if I managed to sort it out.
Edit:
The email was received after using script Tracy suggested. I guess I should wait for provider to investigate the issue further.
 
So here is what we did.

1. We configured email to SMPT like this - Not sure if this is best way? Perhaps @Mike or @Brogan know if smpt is a way to go?

email.webp
2. Our email was flagged as spam by http://spamrl.com/, that is why emails got bounced back. I requested them to white list it, and apparently it will work for 7 days, after that, not sure what happens.

If anyone had a similar issue, please let me know how you solved it.
 
Top Bottom