"; // Boundary $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; // Headers for attachment $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; // Multipart boundary $message = "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $htmlContent . "\n\n"; // Send email $mail = @mail($to, $subject, $message, $headers, $returnpath); } */ ?> isSMTP(); // Set mailer to use SMTP $mail->Host = $mailhost; // Specify main and backup server $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = $mailusername; // SMTP username $mail->Password = $mailpassword; // SMTP password $mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted $mail->Port = $mailport; $mmessage="mailtoken"; include('mailhtml.php'); // Email body content $htmlContent = $mailmessagetoken; $mail->From = $from; $mail->FromName = 'CIMAC Application Form System'; $mail->addAddress($to); // Add a recipient $mail->Subject = $subject; $mail->Body = $htmlContent; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; $mail->send(); // echo 'Message has been sent'; } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; }} ?>