CoreBOSBB
Can't get sending mails use the correct sender - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Development (https://discussions.corebos.org/forumdisplay.php?fid=18)
+--- Forum: coreBOS Development (https://discussions.corebos.org/forumdisplay.php?fid=4)
+--- Thread: Can't get sending mails use the correct sender (/showthread.php?tid=1995)



Can't get sending mails use the correct sender - Guido1982 - 10-28-2020

I set the outgoing server for a specific user through the new Utilities module and tried a sending a mail through the workflow system. When I reply to the e-mail it tries to reply to both the reply-to address I set in the workflow and the e-mail address I set in the general outgoing server settings (so not the Utilities one). That second address is a no-reply so every time the users that want to reply and do so unknowingly to a noreply address receive a non delivered errormessage.

Is there some other setting I need to set to make the system send from the user-based account?


RE: Can't get sending mails use the correct sender - joebordes - 11-10-2020

can you please try this change and let me know if it works better:



Code:
diff --git a/modules/Emails/Emails.php b/modules/Emails/Emails.php

index 547316742..d924a746f 100644
--- a/modules/Emails/Emails.php
+++ b/modules/Emails/Emails.php
@@ -304,7 +304,7 @@ class Emails extends CRMEntity {
                }
                // mailscanner customization: If Support Reply To is defined use it.
                $HELPDESK_SUPPORT_EMAIL_REPLY_ID = GlobalVariable::getVariable('HelpDesk_Support_Reply_EMail', $replyto, 'HelpDesk');
-               if ($HELPDESK_SUPPORT_EMAIL_REPLY_ID && $replyto != $HELPDESK_SUPPORT_EMAIL_REPLY_ID) {
+               if (empty($replyToEmail) && $HELPDESK_SUPPORT_EMAIL_REPLY_ID && $replyto != $HELPDESK_SUPPORT_EMAIL_REPLY_ID) {
                        $mail->AddReplyTo($HELPDESK_SUPPORT_EMAIL_REPLY_ID);
                }
                $mail_status = MailSend($mail);