diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Entity_sendEmail.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Entity_sendEmail.xml
index 916a22e27e203806910af6085a5ecb086a5abd17..99c356f6142afac154cc00bde516ff1ffbe414f6 100644
--- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Entity_sendEmail.xml
+++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Entity_sendEmail.xml
@@ -59,11 +59,11 @@ body = event.getTextContent()\n
 sender = event.getSourceValue()\n
 if kw.get("from_url") is not None:\n
   from_url = kw.get("from_url")\n
-elif event.getSource() is not None:\n
-  sender = event.getSourceValue()\n
+elif sender is not None:\n
   from_url = formataddr((sender.getTitle(), sender.getDefaultEmailText()))\n
 else:\n
   from_url = portal.portal_preferences.getPreferredEventSenderEmail()\n
+\n
 attachment_list = kw.pop(\'attachment_list\', [])\n
 \n
 to_url = formataddr((context.getTitle(), context.getDefaultEmailText()))\n
@@ -72,7 +72,7 @@ document_type_list = list(event.getPortalEmbeddedDocumentTypeList()) + list(even
 embedded_file_list = event.getAggregateValueList(portal_type=document_type_list)\n
 \n
 content_type = event.getContentType()\n
-mail_message = context.Base_createMailMessageAsString(from_url,\n
+mail_message = portal.Base_createMailMessageAsString(from_url,\n
   to_url,\n
   subject,\n
   body,\n
@@ -83,6 +83,9 @@ mail_message = context.Base_createMailMessageAsString(from_url,\n
 event.sendMailHostMessage(mail_message)\n
 \n
 if not event.hasData():\n
+  # Store the content of the email as data, so that we can keep a reference to\n
+  # the email that was actually sent.\n
+  # XXX this has no meaning in the case of an email with multiple recipents.\n
   if len(embedded_file_list):\n
     # do not store aggregated documents in Email document\n
     # to avoid duplicate data\n