0

I have a problem for make email notification when I create account in my website and then give a notification to user via email. This is an error statement :

Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\Helpdesk\traxteam\mail.php on line 8

This is mail.php

<?php 
$b = 0; 
$mail_attached = ""; 
$boundary = md5(time()); 


$add_header = "MIME-Version: 1.0\n". 
"Content-Type: multipart/mixed; boundary="$boundary"; Message-ID: <".md5($email_from).">"; 
$mail_content = "--".$boundary."\n". 
"Content-Type: text/plain; charset="UTF-8"\n". 
"Content-Transfer-Encoding: 8bit \n\n". 
$msg." nn". 
$mail_attached; 
mail($email_address, $subject, $mail_content, "From: ".$email_from."\nCC: ".$email_cc."\n
BCC: ".$email_bcc ."\n Errors-To: ".$email_from."\n".$add_header); 
?>

and this my create_proses.php

<?php

$From = "my.web@web.co.id"; 
$To = $email; 
$Subject = "User Account for Trax helpdesk Website"; 
$Message = "Your account has been created. Your Password = Your ID."; 


$Host = "192.168.180.15"; 
$Username = ""; 
$Password = ""; 

// Do not change bellow 

$Headers = array ('From' => $From, 'To' => $To, 'Subject' => $Subject); 
$SMTP = Mail::factory('smtp', array ('host' => $Host, 'auth' => true, 
'username' => $Username, 'password' => $Password)); 

$mail = $SMTP->send($To, $Headers, $Message); 

if (PEAR::isError($mail))
{ 
echo($mail->getMessage()); 
} else { 
echo("Email Message sent!");
} 

?>

1 Answers1

0

change the line number 8

"Content-Type: multipart/mixed; boundary="$boundary"; Message-ID: <".md5($email_from).">"; 

should be

"Content-Type: multipart/mixed; boundary=\"$boundary\"; Message-ID: <".md5($email_from).">"; 

and

"Content-Type: text/plain; charset="UTF-8"\n".

should be

"Content-Type: text/plain; charset=\"UTF-8\"\n".
Mehul V.
  • 620
  • 3
  • 13
Garry
  • 342
  • 5
  • 18