diff --git a/contrib/openldap/core-fd.schema b/contrib/openldap/core-fd.schema
index 4800378ccc72ed883702742b6fc51b8af1394073..276784c4da848633adcdeb7693aca66b41a8921c 100644
--- a/contrib/openldap/core-fd.schema
+++ b/contrib/openldap/core-fd.schema
@@ -320,6 +320,11 @@ attributetype ( 1.3.6.1.4.1.38414.89.1.6 NAME 'fdTasksCreationDate'
   EQUALITY caseExactMatch
   SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
 
+attributetype ( 1.3.6.1.4.1.38414.89.1.7 NAME 'fdTasksEmailsFromdDN'
+  DESC 'Fusion Directory - Emails derived from DN' 
+  EQUALITY caseExactMatch
+  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
+
 ##### Classes #####
 
 objectclass ( 1.3.6.1.4.1.10098.1.2.1.19.4 NAME 'gosaDepartment' SUP top AUXILIARY
@@ -413,4 +418,4 @@ objectclass (1.3.6.1.4.1.38414.89.2.2 NAME 'fdTasksMail'
   DESC 'FusionDirectory - Tasks objects Mail'
   SUP top AUXILIARY
   MUST ( fdTasksMailObject ) 
-  MAY ( fdTasksMailUsers ) )
+  MAY ( fdTasksMailUsers $ fdTasksEmailsFromdDN ) )
diff --git a/plugins/addons/tasks/class_tasksMail.inc b/plugins/addons/tasks/class_tasksMail.inc
index 25451458aab3e14df67cfff7f71429dce5944b23..0a171b1982b16fe05da09e5bef035daa1f7d8c20 100644
--- a/plugins/addons/tasks/class_tasksMail.inc
+++ b/plugins/addons/tasks/class_tasksMail.inc
@@ -64,9 +64,15 @@ class tasksMail extends simplePlugin
             '', _('Select Users/Groups'),
             'fdTasksMailUsers', TRUE,
             [], 'dn'
-          )
+          ),
+         // new HiddenAttribute('fdTasksEmailsFromdDN', TRUE, '', '', 'E-Mails', 'Emails from DN'),
+          new StringAttribute(
+            _('Emails'), _('Name for this task'),
+            'fdTasksEmailsFromdDN', TRUE
+          ),
         ]
-        ],
+      ],
+      
     ];
   }
 
@@ -85,6 +91,40 @@ class tasksMail extends simplePlugin
     }
     asort($tmpSearch);
     $this->attributesAccess['fdTasksMailObject']->setChoices(array_keys($tmpSearch), array_values($tmpSearch));
+    $this->attributesAccess['fdTasksEmailsFromdDN']->setVisible(FALSE); 
+
+
+  }
+
+  /*
+   * Populate the fdTasksEmailsFromDN attribute with related mails addresses. 
+   */
+  protected function shouldSave (): bool
+  {
+    global $config;
+
+    $ldap = $config->get_ldap_link();
+
+    if ($this->attributesAccess['fdTasksMailUsers']->getValue() == TRUE ) {
+      foreach ($this->attributesAccess['fdTasksMailUsers']->getValue() as $dn) {
+        
+        $ldap->cd($dn);
+        $filter = "(objectClass=gosaMailAccount)";
+        $attrs = ["mail"];     
+        
+        $ldap->search($filter, $attrs);
+        $info = $ldap->fetch();
+        // To be developped properly to take Supann and other Mail attributes into consideration.
+        if (!empty($info["mail"][0]) && isset($info["mail"][0])) {
+          
+          // For some obscur reasons this attributes won't save in LDAP.
+          $this->attributesAccess['fdTasksEmailsFromdDN']->setValue($info["mail"][0]);
+          print_r($this->attributesAccess['fdTasksEmailsFromdDN']->getValue());
+        }  
+      }
+    }
+    
+    return parent::shouldSave();
   }
 
 }