News:

Wondering if this will always be free?  See why free is better.

Main Menu

Unable to send emails

Started by zmmccrocklin, May 26, 2022, 02:53:44 PM

Previous topic - Next topic

zmmccrocklin

Hi Guys,
     I'm having issues sending emails out.  I confirmed my email settings & even tested webmail & with a remote email client. No emails are going out and I get nothing on the error logs related to email.

Using the following:
GoDaddy/cPanel
SMF v2.1.2
PHP v7.4
MySQL v5.6

Doug Heffernan

Quote from: zmmccrocklin on May 26, 2022, 02:53:44 PMHi Guys,
     I'm having issues sending emails out.  I confirmed my email settings & even tested webmail & with a remote email client. No emails are going out and I get nothing on the error logs related to email.

Using the following:
GoDaddy/cPanel
SMF v2.1.2
PHP v7.4
MySQL v5.6


When did this happen first? Did you do any modification to your forum prior to it or did it happen out of nowhere? Is there anything pertaining to this logged in the error log?

zmmccrocklin

Quote from: Doug Heffernan on May 26, 2022, 02:55:16 PMWhen did this happen first? Did you do any modification to your forum prior to it or did it happen out of nowhere? Is there anything pertaining to this logged in the error log?

Upgraded from 2.0.5 to 2.1.2.  Site owner was already having issues with email notification, but it doesn't look like anything was configured in the server previously.

Nothing in the error log mentioning issues related to email.  mysqli issues, but that's it.

[25-May-2022 19:07:16 America/Los_Angeles] PHP Warning:  mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, bool given in /home/ojmnpf7pmzky/public_html/Sources/Subs-Db-mysql.php on line 1027
[25-May-2022 19:07:16 America/Los_Angeles] PHP Warning:  mysqli_stmt_execute() expects parameter 1 to be mysqli_stmt, bool given in /home/ojmnpf7pmzky/public_html/Sources/Subs-Db-mysql.php on line 1028


Here is that section of code in the file:

function smf_db_error_insert($error_array)
{
global $db_prefix, $db_connection;
static $mysql_error_data_prep;

// without database we can't do anything
if (empty($db_connection))
return;

if (empty($mysql_error_data_prep))
$mysql_error_data_prep = mysqli_prepare($db_connection,
'INSERT INTO ' . $db_prefix . 'log_errors
(id_member, log_time, ip, url, message, session, error_type, file, line, backtrace)
VALUES( ?, ?, unhex(?), ?, ?, ?, ?, ?, ?, ?)'
);

if (filter_var($error_array[2], FILTER_VALIDATE_IP) !== false)
$error_array[2] = bin2hex(inet_pton($error_array[2]));
else
$error_array[2] = null;
mysqli_stmt_bind_param($mysql_error_data_prep, 'iissssssis',
$error_array[0], $error_array[1], $error_array[2], $error_array[3], $error_array[4], $error_array[5], $error_array[6],
$error_array[7], $error_array[8], $error_array[9]);  <------Line 1027
mysqli_stmt_execute($mysql_error_data_prep);  <---------Line 1028
}


Nothing in the mail queue.

I've done multiple things troubleshooting another issue to include:
- Re-upload the Large upgrade files(with overwrite) & re-run upgrade.php
- Remove all files, re-upload all backed up files (prior to upgrade), re-upload upgrade files, re-run upgrade
- Remove third-party mods

Doug Heffernan

Quote from: zmmccrocklin on May 26, 2022, 04:48:47 PMNothing in the error log mentioning issues related to email.  mysqli issues, but that's it.

Code Select Expand
[25-May-2022 19:07:16 America/Los_Angeles] PHP Warning:  mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, bool given in /home/ojmnpf7pmzky/public_html/Sources/Subs-Db-mysql.php on line 1027
[25-May-2022 19:07:16 America/Los_Angeles] PHP Warning:  mysqli_stmt_execute() expects parameter 1 to be mysqli_stmt, bool given in /home/ojmnpf7pmzky/public_html/Sources/Subs-Db-mysql.php on line 1028

I remember it now from your other topic.

Quote from: zmmccrocklin on May 26, 2022, 02:53:44 PMGoDaddy/cPanel

That says it all. I think that the problem lies with your host in this case. Have you contacted them about this? You said that there are no error in the logs about this, does this include the server log as well?

Additionally, have a look at this link as well.

https://wiki.simplemachines.org/smf/E-Mails_-_Why_are_members_not_getting_emails_sent_from_the_forum

zmmccrocklin

Yeah.  Trying to rule out anything with the forum/php/mysql code before I go down the GD support rabbit hole. I made the config on the forum use an external mail relay for the service that I use, but whether that actually is used is the question.  The php script brought a success message with no email received, so I'm assuming the issue is server-side.  I found a section to see web server/apache logs, but not mail or syslogs, so I might have to get with GoDaddy.  I really hate using shared hosting tools.

Sir Osis of Liver

There are good shared hosts, GoDaddy isn't one of them.  Have you checked your server setup with phpinfo?  I've seen GD cpanel report incorrect version info for php & mysql.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

zmmccrocklin

Quote from: Sir Osis of Liver on May 26, 2022, 05:48:49 PMThere are good shared hosts, GoDaddy isn't one of them.  Have you checked your server setup with phpinfo?  I've seen GD cpanel report incorrect version info for php & mysql.

Ugh.  NO haven't.  It was originally on PHP5.6. when doing the upgrade, I moved it to PHP7.4, which looks like it works.  I'll have to run that to confirm stuffs.

I have my own VPS that I use for my own sites, which is better for me as a Linux Engineer.  Not being able to access & configure what I need in a terminal session is frustrating.  I'm gonna see if I can use this SSH feature with a SSH key so I don't have to mess with my client's password.

Advertisement: