File: D:/HostingSpaces/SBogers36/mecurity-stadsafsluiting.nl/wwwroot/mvc/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 bericht is automatisch gegenereerd ter bevestiging.
</em>
</span>';
$msg .= '</body>';
return $msg;
}
}