diff --git a/core/ajax/share.php b/core/ajax/share.php
index 0cf4b246f98cb04c5ec46e0f4fc3c5f4e60736c1..8b5191e655059175401e8205638b4e60e17e900c 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -114,7 +114,11 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
 				if ($email !== '') {
 					$displayName = \OCP\User::getDisplayName($recipient);
 					$items = \OCP\Share::getItemSharedWithUser($itemType, $itemSource, $recipient);
-					$filename = $items[0]['file_target'];
+					$filename = trim($items[0]['file_target'], '/');
+					$expiration = null;
+					if (isset($items[0]['expiration'])) {
+						$expiration = $items[0]['expiration'];
+					}
 
 					if ($itemType === 'folder') {
 						$foldername = "/Shared/" . $filename;
@@ -125,7 +129,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
 					}
 
 					$url = \OCP\Util::linkToAbsolute('files', 'index.php', array("dir" => $foldername));
-					$text = $defaults->getShareNotificationText(\OCP\User::getDisplayName(), $filename, $itemType, $url);
+					$text = $defaults->getShareNotificationText(\OCP\User::getDisplayName(), $filename, $itemType, $url, $expiration);
 
 					try {
 						OCP\Util::sendMail(
diff --git a/lib/defaults.php b/lib/defaults.php
index 26f417ae2ae86bead3b63e79a306549060ed06a8..0685fbb16c02f22111ca6c4fae77e537b36e7eb4 100644
--- a/lib/defaults.php
+++ b/lib/defaults.php
@@ -65,12 +65,17 @@ class OC_Defaults {
 	 * @param string $itemName name of the file/folder
 	 * @param string $itemType typically "file" or "folder"
 	 * @param string $link link directly to the file/folder in your ownCloud
+	 * @param string $expiration expiration date
 	 */
-	public function getShareNotificationText($sender, $itemName, $itemType, $link) {
+	public function getShareNotificationText($sender, $itemName, $itemType, $link, $expiration=null) {
 		if ($this->themeExist('getShareNotificationText')) {
-			return $this->theme->getShareNotificationText($sender, $itemName, $itemType, $link);
+			return $this->theme->getShareNotificationText($sender, $itemName, $itemType, $link, $expiration);
 		} else {
-			return $this->l->t("%s shared a %s called %s with you. You can find the %s here: %s", array($sender, $itemType, $itemName, $itemType, $link));
+			if ($expiration) {
+				return $this->l->t("%s shared a %s called %s with you. The share will expire at %s. You can find the %s here: %s", array($sender, $itemType, $itemName, $expiration, $itemType, $link));
+			} else {
+				return $this->l->t("%s shared a %s called %s with you. You can find the %s here: %s", array($sender, $itemType, $itemName, $itemType, $link));
+			}
 		}
 	}
 
diff --git a/lib/public/defaults.php b/lib/public/defaults.php
index 9c8c3c0bdabd8dad85a026b73169e00c27d707a9..573831e8eae0d410bd90abe302b38f6dd799441f 100644
--- a/lib/public/defaults.php
+++ b/lib/public/defaults.php
@@ -48,9 +48,10 @@ class Defaults {
 	 * @param string $itemName name of the file/folder
 	 * @param string $itemType typically "file" or "folder"
 	 * @param string $link link directly to the file/folder in your ownCloud
+	 * @param string $expiration expiration date
 	 */
-	public function getShareNotificationText($sender, $itemName, $itemType, $link) {
-		return $this->defaults->getShareNotificationText($sender, $itemName, $itemType, $link);
+	public function getShareNotificationText($sender, $itemName, $itemType, $link, $expiration) {
+		return $this->defaults->getShareNotificationText($sender, $itemName, $itemType, $link, $expiration);
 	}
 
 	/**