[insert_php]
if(isset($_POST[‘submit’]))
{
$message=
‘Bedrijfsnaam: ‘.$_POST[‘company’].’
Naam gebruiker: ‘.$_POST[‘gebruiker’].’
Werkstation naam: ‘.$_POST[‘pc’].’
Contact methode: ‘.$_POST[‘contact’].’
E-mail: ‘.$_POST[’email’].’
Type incident: ‘.$_POST[‘incident’].’
Verzoek prioriteit: ‘.$_POST[‘prio’].’
korte omschrijving: ‘.$_POST[‘omschrijving’].’
Melding: ‘.$_POST[‘melding’].’
‘;
require “phpmailer/class.phpmailer.php”; //include phpmailer class
// Instantiate Class
$mail = new PHPMailer();
// Set up SMTP
$mail->IsSMTP(); // Sets up a SMTP connection
$mail->SMTPAuth = true; // Connection with the SMTP does require authorization
//$mail->SMTPSecure = “ssl”; // Connect using a TLS connection
$mail->Host = “webreus.email”; //Gmail SMTP server address
$mail->Port = 25; //Gmail SMTP port
$mail->Encoding = ‘7bit’;
// Authentication
$mail->Username = “helpdesk@mboeve.com”; // Your full Gmail address
$mail->Password = “da4mkCUVF_9”; // Your Gmail password
// Compose
$mail->SetFrom($_POST[’email’]);
$mail->AddReplyTo($_POST[’email’]);
$mail->Subject = ($_POST[‘omschrijving’]); // Subject (which isn’t required)
$mail->MsgHTML($message);
// Send To
$mail->AddAddress(“helpdesk@et.nl”, “ET Computers Helpdesk”); // Where to send it – Recipient
$result = $mail->Send(); // Send!
$message = $result ? ‘U heeft zojuist een incident aangemeld bij ET Computers.
U ontvangt hiervan per mail een bevestiging, heeft u deze over 10 min nog niet ontvangen neem dan telefonisch contact op met onze helpdesk.
‘ : ‘Sending Failed!’;
unset($mail);
}
[/insert_php]