Reply Email not working!

Hi folks!

Before adding an issue on GitHub, I’d like to know if anybody else has the same problem as me.

If I compose a new email, it will send properly. But if I reply an incoming email, an error is thrown when sending the reply. It happens for imported and not-imported messages.

The apache error log shows a message that does not seem to be related to this error:

[Mon Jun 18 16:52:57.799581 2018] [proxy_fcgi:error] [pid 1118:tid 140584561882880] [client 127.0.0.1:53262] AH01071: Got error ‘PHP message: PHP Notice: Undefined variable: emailAddress in /var/www/html/suitecrmdev/modules/Emails/include/displayEmailAddressOptInField.php on line 80\n’, referer: http://localhost/suitecrmdev/index.php?module=Emails&action=DetailView&record=7f37a136-03c5-7c7a-5163-5b280b747ea6

Version 7.10.7 (it happened on 7.10.4)
Thank you!

Seems to be this one

https://github.com/salesagility/SuiteCRM/issues/5678

you can try adding your voice there… it seems pretty forgotten.

Thank you, pgr! Always fast response…

I have tried modifying the PHP code on this file. But the error persists. I think this log entry is not related with the error. That’s what I did:

BEFORE on modules/Emails/include/displayEmailAddressOptInField.php on line 80:


if ($emailAddress instanceof SugarEmailAddress) {
   $tick = $emailAddress->getOptInStatusTickHTML();
}

AFTER:


if ( (isset($emailAddress) ) && ($emailAddress instanceof SugarEmailAddress) ) {
   $tick = $emailAddress->getOptInStatusTickHTML();
}

The log entry disappeared. But I still cannot reply any e-mail. In this case, the issue #5678 would not solve this problem.
Do you have the same problem? Does anybody confirm this error?

Thank you

Can you please try adding this line before that “if”?

$emailAddress = $focus->getEmailAddressFromEmailField($addressField);

Thank you, pgr. The results are the same: impossible to reply an email. The same error. I’m in Emails module, not Campaigns. I believe these lines may not be related to this error.

Could anybody try to reproduce this error, please?

I can’t right now but I asked Dillon to reproduce and he said he couldn’t - it seems this works well on his system.

I made a PR to fix the missing line issue, it was a bug indeed:
https://github.com/salesagility/SuiteCRM/pull/6055

But it seems it is not the same bug that is causing your problem…