· 8 years ago · Feb 03, 2018, 05:56 AM
1$address = '*****@gmail.com';
2$message = 'Hello ,<br> This is test email.';
3$subject = 'Test Email';
4$mail = new PHPMailer();
5if(0) {
6 $mail->IsSendmail(true);
7} else {
8 $mail->Mailer = "smtp";
9 $mail->SMTPAuth = true;
10 $mail->Host = ****;
11 $mail->Username = ****;
12 $mail->Password = ****;
13
14}
15$mail->IsHTML(true);
16$mail->From = ****;
17$mail->FromName = 'Test';
18$mail->Subject = $subject;
19$mail->Body = str_replace('n','<br>',$message);
20$mail->AddAddress($address);
21$mail>AddAttachment(DIR_FS_DOCUMENT_ROOT."images/".SITE_LOGO,SITE_LOGO);
22$mail_status=$mail->Send();
23if (1){
24 echo "<pre>";
25 print_r($mail);
26 echo "</pre>";
27}
28return $mail_status;