Index: /mods/wpsg_mod_deliverynote.class.php
===================================================================
--- /mods/wpsg_mod_deliverynote.class.php	(revision 5949)
+++ /mods/wpsg_mod_deliverynote.class.php	(revision 5956)
@@ -80,4 +80,7 @@
 			$this->shop->checkDefault('wpsg_mod_deliverynote_nrformat', '%lnr%');
 			$this->shop->checkDefault('wpsg_mod_deliverynote_nr', '1');
+			
+			// Voreinstellungen der E-Mail
+			$this->shop->checkDefault('wpsg_deliverymail_betreff', __('Ihr Lieferschein', 'wpsg'));
 						
 			if ($this->shop->get_option('wpsg_mod_deliverynote_texte') === false) $this->resetAction();				
@@ -448,4 +451,21 @@
 		} // public function be_ajax()
 		
+		public function admin_emailconf() 
+		{ 
+			
+			echo wpsg_drawEMailConfig(
+				'deliverymail',
+				__('E-Mail mit dem Lieferschein', 'wpsg'),
+				__('Diese Mail geht an den Kunden oder an die angegebene E-Mail Adresse', 'wpsg')); 
+			
+		} // public function admin_emailconf()
+		
+		public function admin_emailconf_save() 
+		{ 
+			
+			wpsg_saveEMailConfig("deliverymail");
+			
+		} // public function admin_emailconf_save()
+		
 		/** Modulfunktionen */
 		
@@ -534,15 +554,13 @@
 			if ($email === false) $email = $this->shop->view['customer']['email'];
 			
-			$this->shop->sendMail($mail_text, $email, 'deliverymail', $arFiles, $this->shop->view['order']['id'], $this->shop->view['order']['k_id'], $mail_html);
+			list($subject, $mail_text) = $this->shop->sendMail($mail_text, $email, 'deliverymail', $arFiles, $this->shop->view['order']['id'], $this->shop->view['order']['k_id'], $mail_html);
 						
 			$this->shop->restoreTempLocale();
-			
-			$strSubject = wpsg_translate(__('Lieferschein ##1#', 'wpsg'), $this->shop->view['dn']->lnr);
-			
+			 
 			// In Bestelllog eintragen
 			$this->db->ImportQuery(WPSG_TBL_OL, array(
 				"o_id" => wpsg_q($order_id),
 				"cdate" => "NOW()",
-				"title" => wpsg_q($strSubject),
+				"title" => wpsg_q($subject),
 				"mailtext" => wpsg_q($mail_text)
 			));  
