Location: PHPKode > projects > P3Mailer > p3mailer/examples/inline_image.php
<?php

/**
 * @author  Samuel Carlier
 * @package P3Base_Mailer_Examples
 */
try {

	require '../p3base/P3Base.php';

	$envelope = new P3Base_Mailer_Envelope;
	$envelope->setSubject('P3Mailer inline image test');
	$envelope->setFrom('hide@address.com', 'name');
	$envelope->addTo('hide@address.com', 'name');

	//lets test the logo.png wich is found in the same dir as this file.
	$envelope->setHTMLMessage('P3Mailer (p3mailer.phppatterns.nl) inline image test<br /> <img src="logo.png">');

	$mailer = new P3Base_Mailer_Handler_SMTP('your mail server');
	$mailer->perform($envelope);

	//close connection
	$mailer = null;

} catch(Exception $e) {
	echo '<hr /><b>Error Occured</b><br />';
	echo nl2br($e->getMessage());
}

?>
Return current item: P3Mailer