Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //ini_set(‘display_errors’, 1);
- include '/var/www/includes/mailer.php';
- //require 'PHPMailerAutoload.php';
- $mail = new PHPMailer;
- $mail->SMTPDebug = 3; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'smtp.nicetrygoyim.nl'; //Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'secret@secret.com'; // SMTP username
- $mail->Password = 'nicetry'; // SMTP password
- $mail->SMTPSecure = 'TLS'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- $mail->setFrom('secret@secret.com', 'Mailer');
- $mail->addAddress('secret@secret.com', 'secret'); // Add a recipient
- $mail->addAddress('secret@secret.com', 'secret); // Name is optional
- //$mail->addReplyTo('secret@secret.com', 'Information');
- //$mail->addCC('cc@example.com');
- //$mail->addBCC('bcc@example.com');
- //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
- //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = 'Here is the subject';
- $mail->Body = 'This is the HTML message body <b>in bold!</b>';
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- $mail->smtpConnect([
- 'ssl' => [
- 'verify_peer' => false,
- 'verify_peer_name' => false,
- 'allow_self_signed' => true
- ]
- ]);
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent';
- }
- ?>
- <form action="mail.php" method="post">
- Leerlingnummer:<br>
- <input type="text" name="leerlingnummer"required placeholder="Voer hier het leerlingnummer in" /><br>
- E-mailadres:<br>
- <input type="submit" name="submit" class="groottext" value="Reparatie indienen"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement