Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_POST['btnVerstuur']))
- {
- $vriendnaam = $_POST['TxtNaam'];
- $naarEmail = $_POST['TxtEmail'];
- require 'PHPMailer/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- //$mail->SMTPDebug = 3; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'commisie.feest@gmail.com'; // SMTP username
- $mail->Password = 'Zoomvliet17'; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- $mail->setFrom('commisie.feest@gmail.com', 'VSV-Consultency');
- $mail->addAddress($_POST['TxtEmail'], $_POST['TxtEmail']); // Name is optional
- $mail->addReplyTo('commisie.feest@gmail.com', 'Information');
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = 'VSV-Consultency';
- $mail->Body = 'Beste '.$vriendnaam.'
- <br/>
- <br/>
- Goededag je vriend heeft je uitgenodigd om deze web site te bezoeken
- <br/>
- <br/>
- http://localhost/IB1A/project4/vsvhome.php
- <br/>
- <br/>
- met vriendelijke groet
- <br/>
- <br/>
- <br/>
- De Feest Commissie!!';
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- if(!$mail->send()) {
- echo 'mail is nog niet verzonden.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'mail is verzonden';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement