<?php
	
	$_attributes = 'valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-left: 6.25%; padding-right: 6.25%; width: 87.5%; font-size: 17px; font-weight: 400; line-height: 160%; padding-top: 25px; color: #000000; font-family: sans-serif;" class="paragraph"';
			
	$this->PHPMailer->Body = str_replace("<section>", '
	<!-- PARAGRAPH -->
	<!-- Set text color and font family ("sans-serif" or "Georgia, serif"). Duplicate all text styles in links, including line-height -->
	<tr>
		<td ' . $_attributes . '>', $this->PHPMailer->Body);
			
		
	$this->PHPMailer->Body = str_replace("</section>", '
		</td>
	</tr>', $this->PHPMailer->Body);
	
	
	$this->PHPMailer->Body = preg_replace("/<\/?hr\/?>/i", '<!-- LINE -->
	<!-- Set line color -->
	<tr>	
		<td align="center" valign="top" style="border-collapse: collapse; border-spacing: 0; margin: 0; padding: 0; padding-left: 6.25%; padding-right: 6.25%; width: 87.5%;
			padding-top: 25px;" class="line"><hr
			color="#E0E0E0" align="center" width="100%" size="1" noshade style="margin: 0; padding: 0;" />
		</td>
	</tr>', $this->PHPMailer->Body);
	
	
	$this->PHPMailer->Body = preg_replace("/<table/i", '
	<!-- LINE -->
	<!-- Set line color -->
	<table border="0" cellpadding="0" cellspacing="0" width="100%" ', $this->PHPMailer->Body);
	
	
	$this->PHPMailer->Body = preg_replace_callback("/\{:(\w+)\}/i", function($match) use($settings) {
		return $settings->get( $match[1] );
	}, $this->PHPMailer->Body);
	
	
	print_r( $this->PHPMailer->Body );
	
	
