mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	header and footer of body can be skipped
This commit is contained in:
		
							parent
							
								
									08e04e3170
								
							
						
					
					
						commit
						6fedb19490
					
				|  | @ -76,10 +76,14 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { | |||
| 	 * @param string $message key of string containing the body of the mail | ||||
| 	 * @param array $params list of parameters which replaces placeholder in | ||||
| 	 *        the subject and body | ||||
| 	 *        This may contain the special keys | ||||
| 	 *        __lang__: use this language for the email | ||||
| 	 *        __skip_header__: do not include the standard body header | ||||
| 	 *        __skip_footer__: do not include the standard body footer | ||||
| 	 * @param array $attachments list of attachments | ||||
| 	 * @return false or -1 in case of error, otherwise true | ||||
| 	 */ | ||||
| 	function toIndividual($sender, $recipient, $subject, $message, $params=array(), $attachments=array()) { /* {{{ */ | ||||
| 	function toIndividual($sender, $recipient, $subject, $messagekey, $params=array(), $attachments=array()) { /* {{{ */ | ||||
| 		if(is_object($recipient) && !strcasecmp(get_class($recipient), $this->_dms->getClassname('user')) && !$recipient->isDisabled() && $recipient->getEmail()!="") { | ||||
| 			$to = $recipient->getEmail(); | ||||
| 			$lang = $recipient->getLanguage(); | ||||
|  | @ -107,8 +111,12 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { | |||
| 		} | ||||
| 
 | ||||
| 
 | ||||
| 		$message = getMLText("email_header", $params, "", $lang)."\r\n\r\n".getMLText($message, $params, "", $lang); | ||||
| 		$message .= "\r\n\r\n".getMLText("email_footer", $params, "", $lang); | ||||
| 		$message = ''; | ||||
| 		if(!isset($params['__skip_header__']) || !$params['__skip_header__']) | ||||
| 			$message .= getMLText("email_header", $params, "", $lang)."\r\n\r\n"; | ||||
| 		$message .= getMLText($messagekey, $params, "", $lang); | ||||
| 		if(!isset($params['__skip_footer__']) || !$params['__skip_footer__']) | ||||
| 			$message .= "\r\n\r\n".getMLText("email_footer", $params, "", $lang); | ||||
| 
 | ||||
| 		$mime = new Mail_mime(array('eol' => "\n")); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann