Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-4501

User profile: no change email mail is sent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 14.2
    • Fix Version/s: 14.2.1
    • Component/s: None
    • Labels:
      None

      Description

      When a user wants to change his email address in his profile no email is sent with the confirmation link. The cause is that in MailManagerImpl the code down if(!StringHelper.containsNonWhitespace(from)) (line 954) is never reached because the from address is filled by a real address. Therefore fromAddress is null which causes that the email is not sent. This is my suggestion:

       

      diff --git a/src/main/java/org/olat/core/util/mail/manager/MailManagerImpl.java b/src/main/java/org/olat/core/util/mail/manager/MailManagerImpl.java
      index f90118f..89833dc 100644
      --- a/src/main/java/org/olat/core/util/mail/manager/MailManagerImpl.java
      +++ b/src/main/java/org/olat/core/util/mail/manager/MailManagerImpl.java
      @@ -952,13 +952,13 @@
       				mail.setFrom(fromRecipient);
       			} else {
       				if(!StringHelper.containsNonWhitespace(from)) {
      -					if (mimeFromAddress != null) {
      -						from = mimeFromAddress.getPersonal();
      -						fromAddress = mimeFromAddress;
      -					} else {
      -						from = WebappHelper.getMailConfig("mailFrom");
      -						fromAddress = createFromAddress(from, result);
      -					}
      +					from = WebappHelper.getMailConfig("mailFrom");
      +				}
      +				if (mimeFromAddress != null) {
      +					from = mimeFromAddress.getPersonal();
      +					fromAddress = mimeFromAddress;
      +				} else {
      +					fromAddress = createFromAddress(from, result);
       				}
       				DBMailRecipient fromRecipient = new DBMailRecipient();
       				fromRecipient.setEmailAddress(from);
      

       

        Figma for Jira By 42nd

          Attachments

            Activity

              People

              Assignee:
              uhensler Urs Hensler
              Reporter:
              stephan Stephan Clemenz
              Tester:
              Mandy Menzel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 15 minutes
                  15m