NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Im having problems with the FROM email when i share or i mention anyone.

      If jira send any notification, the from is "User fullname - email: jira@localhost.com" this email is the localhost smtp from the server.

      The problem is when i Share an issue or mention anyone in a comment.

      The from of this notification when i mention or share is the user email, not the outgoing email used in normal notifications.

      Example:

      -From: $fullname (JIRA) <augusto.gregorio@mycompany.com>

      The problem using this email, is that when a email is send with this "from" to another exchange email @mycompany.com i get an error.

      If i mention anyone outside my exchange network theres no problem in sending the email because theres no server validation.

      So what i want is to change the from, so if any user mention or share, the email is send throw the Outgoing email: jira@localhost.com like all the automated notifications.

      Example:

      $fullname (jira) Correct Email Incorrect
      from: Augusto Gregorio (jira) <jira@localhost.com> USER PERSONAL EMAIL

      Please see attachment, and sorry for my english.

      Regards.
      Augusto.

        1. correct from.jpg
          correct from.jpg
          36 kB
        2. incorrect from.jpg
          incorrect from.jpg
          60 kB

            [JRASERVER-27680] Email From problem

            sladey added a comment -

            kimwall we try to ship our 5.0.x releases every 2 weeks. 5.0.3 shipped on 23rd April so you should see 5.0.4 in the first half of May.

            sladey added a comment - kimwall we try to ship our 5.0.x releases every 2 weeks. 5.0.3 shipped on 23rd April so you should see 5.0.4 in the first half of May.

            Kim Wall added a comment -

            Excellent. Do you have an ETA on 5.0.4?

            Kim Wall added a comment - Excellent. Do you have an ETA on 5.0.4?

            bain added a comment -

            kimwall This will most likely go out in 5.0.4.

            The sending user is now fixed to the project or global e-mail address for mentions and share. The 'Reply-to' address is set to the user that caused the e-mail to be sent.

            bain added a comment - kimwall This will most likely go out in 5.0.4. The sending user is now fixed to the project or global e-mail address for mentions and share. The 'Reply-to' address is set to the user that caused the e-mail to be sent.

            Kim Wall added a comment -

            Just to confirm, the changes you plan on making for 5.0.4 will correct the issues that users are having with the Share button, correct? Currently, because our system email account in Exchange does not have rights to send emails for all users, the emails sent as a Share are not being sent at all.

            This is a very useful feature and we'd like to be sure we can use it.

            Please confirm.

            Thanks!

            Kim Wall added a comment - Just to confirm, the changes you plan on making for 5.0.4 will correct the issues that users are having with the Share button, correct? Currently, because our system email account in Exchange does not have rights to send emails for all users, the emails sent as a Share are not being sent at all. This is a very useful feature and we'd like to be sure we can use it. Please confirm. Thanks!

            Joshua Ali (Inactive) added a comment - - edited

            SendBulkMail and ContactAdministrators will use the user's email address as the Reply-To address. The From address will be the global email address.

            Shares and mentions will, just like with issue notifications, use the user's email address as the Reply-To address. The From address will be the project's email address.

            Joshua Ali (Inactive) added a comment - - edited SendBulkMail and ContactAdministrators will use the user's email address as the Reply-To address. The From address will be the global email address. Shares and mentions will, just like with issue notifications, use the user's email address as the Reply-To address. The From address will be the project's email address.

            Matt Quail (Inactive) added a comment - - edited
            • MailService and it's sendRenderedMail() method was added in 5.0.
            • That method is (just) used by EmailMentionUsers and ShareServiceImpl.
            • The first arg to that method is "from". This is used to set the from display name and the from email.
            • JIRA's out-going SMTP server makes you supply a from address.
            • Each Project (in it's Notifications config) allows you to specify a per-project email address. This override is used for issue-related notifications.
            • (ideal/stretch) Mentions should use the project's from address.
            • (ideal/stretch) Shares of issues should use the project's from address.
            • Otherwise everything else should use the global from address.
            • The address in From: header should never be anything other than the the global or per-project from address. The "display name" can be over-ridden of course, as it is now.
            • For shares and mentions, we should add a Reply-To header.

            Therefore:

            • The "from" argument in sendRenderedMain() should be renamed "reply to", and MailServer should never allow you to use an arbitrary from address. This is in the stable API, we can change the semantics, but not the signature.
            • We can add a new method to MailServer that allows you to hint the project context, so the most appropriate from address can be chosen. (Instead of lots of overridden methods, we should consider using a builder.)
            • There is a lot of duplication between MailServiceImpl and IssueMailQueueItem (e.g. construction of senderFrom). And in fact, IssueMailQueueItem already correctly handles ProjectKeys.EMAIL_SENDER, of if it wasn't duplicated to begin with we might not have got into this problem. This duplication should be refactored.

            Matt Quail (Inactive) added a comment - - edited MailService and it's sendRenderedMail() method was added in 5.0. That method is (just) used by EmailMentionUsers and ShareServiceImpl. The first arg to that method is "from". This is used to set the from display name and the from email. JIRA's out-going SMTP server makes you supply a from address. Each Project (in it's Notifications config) allows you to specify a per-project email address. This override is used for issue-related notifications. (ideal/stretch) Mentions should use the project's from address. (ideal/stretch) Shares of issues should use the project's from address. Otherwise everything else should use the global from address. The address in From: header should never be anything other than the the global or per-project from address. The "display name" can be over-ridden of course, as it is now. For shares and mentions, we should add a Reply-To header. Therefore: The "from" argument in sendRenderedMain() should be renamed "reply to", and MailServer should never allow you to use an arbitrary from address. This is in the stable API, we can change the semantics, but not the signature. We can add a new method to MailServer that allows you to hint the project context, so the most appropriate from address can be chosen. (Instead of lots of overridden methods, we should consider using a builder.) There is a lot of duplication between MailServiceImpl and IssueMailQueueItem (e.g. construction of senderFrom). And in fact, IssueMailQueueItem already correctly handles ProjectKeys.EMAIL_SENDER, of if it wasn't duplicated to begin with we might not have got into this problem. This duplication should be refactored.

            We should use the same From line that we use for other notifications (e.g. assigned, issue edited). mquail what do you think?

            cc: rsmart

            Luis Miranda (Inactive) added a comment - We should use the same From line that we use for other notifications (e.g. assigned, issue edited). mquail what do you think? cc: rsmart

              rsmart metapoint
              c1feebbd3ea2 Juan Augusto Gregorio
              Affected customers:
              3 This affects my team
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: