Hello,
I wonder if someone could help me out, I have a script which sends out an email but i really want to add a picture at the top (Company Logo etc) i have tried playing around with the code but it will not work?? Could anyone give me a pointer in the right direction
Many Thanks
/*Sending mail to customer*/
$exp_dt_crt = explode(',',substr($out_date,0,-1));
foreach($exp_dt_crt as $v)
{
$exp_dt_crt_n = explode('-',$v);
$f_exp_date .= $exp_dt_crt_n[2].'/'.$exp_dt_crt_n[1].'/'.$exp_dt_crt_n[0].',';
}
$f_date = substr($f_exp_date,0,-1);
$re=mysql_query("select * from `drivers` where `d_id`='$out_driver'")or die(mysql_error());
$r_re=mysql_fetch_array($re);
$drv_name = $r_re['d_name'];
$drv_phone = $r_re['d_phone'];
$to=$cust_email_add;
$result9=mysql_query("select * from `mail_format` where `mail_id`='1'")or die(mysql_error());
$result7=mysql_query("select * from `mail_format` where `mail_id`='10'")or die(mysql_error());
$result8=mysql_query("select * from `mail_format` where `mail_id`='7'")or die(mysql_error());
$r=mysql_fetch_array($result9);
//echo 'customer<br/>';
$subject='Outbound Booking Confirmation';
$r1=mysql_fetch_array($result7);
$r2=mysql_fetch_array($result8);
$messagebody ="<html><body><p>Below is confirmation of your booking with Travel.</p>";
$messagebody .="<p><u><b>Booking Details</b></u><br></p>";
$messagebody .='Hello, '.$cust_name_add."<br>"."<br>".
'Booking type:- '.' Outbound'."<br>".
/*'Booking date:- '. date('d/m/Y')."<br>".*/
'Customer name:- '.$cust_name_add."<br>".
'Departure date:- '.$f_date."<br>".
'Pick up time:- '.$out_time_collection."<br>".
'Terminal:- '.$out_terminal."<br>".
'Pick up point:- '.$out_pick_add."<br>".
'Drop off point:- '.$out_drop_add."<br>".
'Number of passengers:- '.$out_people."<br>".
'Additional Information:- '.$out_comment."<br>".
'Price:- '.$out_price."<br>".
'Driver Name:- '.$drv_name."<br>".
'Driver Phone:- '.$drv_phone."<br>"."<br>".
'Terms and Conditions:- '.$r1['mail_content'].'<br>'."<br>";
$messagebody .="Thank you. <br></body></html>";
$mailheaders = "From: Travel <bookings@travel.com> \n";
$mailheaders .= 'MIME-Version: 1.0' . "\n";
$mailheaders .= 'Content-type: text/html; charset=iso-8859-1' . "\n";
set_time_limit(0);
ignore_user_abort(true);
$form = 'bookings@travel.com';
$m = new dSendMail2;
$mailid = $cust_email_add;
//$mailid='test@gmail.com';
$m->setTo($mailid);
$m->setFrom($form);
$m->setSubject($subject);
$m->setMessage($messagebody);
$m->send();