View Issue Details

IDProjectCategoryView StatusLast Update
0012925mantisbtemailpublic2012-08-26 16:17
Reporterparanoico Assigned Todregad  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionduplicate 
Product Version1.2.4 
Summary0012925: Trying to debug problem sending email
Description

I have moved my mantisbt since several days ago to a new server.
There, I have had the email sending functionality not running at all. So today I searched for hours on the inernet with no luck.
I have tried to enable the logging features with the $g_log_level and $g_log_destination variables, but nothing happened (no file in the destination file, and even more, no file at all)(!).
I have also tried the test_email.php page from admin dir, but it gave me no useful answer, only the "PROBLEMS SENDING MAIL TO:...Please check your php/mail server settings" message.
Finally, at 2am I had to hack some mantisbt files (attached) so I could get the inner Email PHPMailer ErrorInfo variable.
What I did is:

  • Modified core/email_queue_api.php and added a "var $errorinfo = '';" to the EmailData class.
  • Modified core/email_api.php in the email_send function to set the parameter passed by ref "&$p_email_data". Also copied the ErrorInfo property to the new errorinfo in p_email_data->errorinfo before returning false, like this:
    $p_email_data->errorinfo = $mail->ErrorInfo;
    $t_success = false;
  • Finally, modified the error message in test_email.php to add the new property from the $t_email_data var, like this:
    echo ' PROBLEMS SENDING MAIL TO: ' . config_get_global( 'administrator_email' ) . ' [' . $t_email_data->errorinfo . ']. Please check your php/mail server settings.
    ';

Now it is almost 3am and, for now, I finally have a meaningful error message: "SMTP Error: Could not connect to SMTP host".
So, I must say I am really a mantisbt noob but hope this modifications can be added in a future release or maybe some similar from the experts.
I could not find any other way to dig in into the error.
Tomorrow I will be able to fix it.

TagsNo tags attached.
Attached Files
email_test_hack.zip (15,736 bytes)

Relationships

duplicate of 0014543 closeddregad Emails are not sent to addresses with single subdomain 

Activities