HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/spire.komma-mediadesign.nl/wwwroot/kms/app/models/mail/m_mailMessage.php
<?php

class MailMessage
{
	private $_salution;
	private $_msg;
	private $_styles;
	 
	public function __construct($msg, $salution = 'gebruiker')
	{
		$this->_salution = $salution;
		$this->_msg = $msg;
		$this->styles = array('body { margin: 10px; background-color:#fff; } ', 'a{ color:#ed9421; text-decoration:underline; } ');
	}
	
	/**
	* Adds a style-element to the email
	*
	* @access public 
	* @param string
	* @return null
	*/
	public function addStyle($input)
	{
		$this->_styles[] = $input;
	}
	
	/**
	* Returns a standard message
	*
	* @access public
	* @param
	* @return string
	*/
	public function get()
	{
		$msg = '<body>';
		$msg .= '<style>';
		
		foreach($this->_styles as $style)
		{
			$msg .= $style;
		}
		
		$msg .= '</style>';
		$msg .= '<div style=\"color:#4070B6; font-family:Verdana,Geneva,sans-serif; font-size:11px; line-height:18px; padding-bottom:23px; width: 800px;\">';
				
		$msg .= '<strong>Beste '.$this->_salution.'</strong>,<br /><br />';
		
		$msg .= $this->_msg;
		
		$msg .= '<span style="color:#808080">
					<em>
						Dit is een automatisch gegeneerd bericht, u kunt hier niet op reageren.<br />
						Bij vragen kunt u contact opnemen via info@komma-mediadesign.nl
					</em>
				 </span>';
		$msg .= '</body>';		 
		
		return $msg;
	}
}