Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $name = $_POST['name'];
- $email = $_POST['email'];
- $telephone = $_POST['telephone'];
- $ticket = $_POST['ticket'];
- $address = $_POST['address'];
- $fb = $_POST['fb'];
- function redirectToBillpliz($ticket)
- {
- // To redirect form on a particular page
- header("Location: https://www.billplz.com/gsmmvspx5");
- }
- $bodyEmail = "
- <h4>Bengkel Excel Registration</h4>
- <p>
- <table>
- <tr>
- <td>Name</td><td>{$name}</td>
- </tr>
- <tr>
- <td>Email</td><td>{$email}</td>
- </tr>
- <tr>
- <td>Tel No</td><td>{$telephone}</td>
- </tr>
- <tr>
- <td>Address</td><td>{$address}</td>
- </tr>
- <tr>
- <td>Link Fb</td><td>{$fb}</td>
- </tr>
- </table>
- </p>
- ";
- $recipientEmail = 'diana@techharvest.asia';
- require 'PHPMailer-master/PHPMailerAutoload.php';
- $mail = new PHPMailer();
- $mail->isSmtp();
- $mail->SMTPDebug = 1;
- $mail->SMTPAuth = true;
- $mail->SMTPSecure = 'SSL';
- $mail->Host = "mail.techharvest.asia";
- $mail->Port = "465";
- $mail->isHTML(true);
- $mail->Username = "diana@techharvest.asia";
- $mail->Password = "Hti4300155";
- $mail->From = "diana@techharvest.asia";
- $mail->Subject = "Bengkel Excel for Business";
- $mail->Body = $bodyEmail;
- $mail->addAddress($recipientEmail);
- // Use for debug only
- if ($mail->SMTPDebug > 0) {
- if (!$mail->send()) {
- die("Mail Not Sent");
- } else {
- die("Mail Sent");
- }
- } else {
- $mail->send();
- redirectToBillpliz($ticket);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement