public/afolique/theme/contact.php
//Simple mail function with HTML header
Simple mail function with HTML header
Simple mail function with HTML header
function sendmail($to, $subject, $message, $from) {
	$mgClient = new Mailgun('key-d01b6d0615061c7b4548d2feaa874ea5');
	$domain = "jonbrobinson.com";
	$headers = "MIME-Version: 1.0" . "\r\n";
	$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
	$headers .= 'From: ' . $from . "\r\n";
	$result = $mgClient->sendMessage($domain, array(
	    'from'    => $from,
	    'to'      => $to,
	    'subject' => $subject,
	    'text'    => $message . $headers
	));
	if ($result) return 1;
	else return 0;
}
function sendmail ( $ to , $ subject , $ message , $ from ) { $ mgClient = new Mailgun ( 'key-d01b6d0615061c7b4548d2feaa874ea5' ) ; $ domain = " jonbrobinson.com " ; $ headers = " MIME-Version: 1.0 " . " \r \n " ; $ headers .= " Content-type:text/html;charset=iso-8859-1 " . " \r \n " ; $ headers .= 'From: ' . $ from . " \r \n " ; $ result = $ mgClient -> sendMessage ( $ domain , array ( 'from' => $ from , 'to' => $ to , 'subject' => $ subject , 'text' => $ message . $ headers ) ) ; if ( $ result ) return 1 ; else return 0 ; }
Simple mail function with HTML header
Simple mail function with HTML header
// $result = mail($to,$subject,$message,$headers);