Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST["send"])){
- if ($_SERVER['REQUEST_METHOD'] == 'POST'){
- require 'PHPMailerAutoload.php';
- require 'class.phpmailer.php';
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'smtp.mail.yahoo.com';
- $mail->SMTPAuth = true;
- $mail->Username = 'Asiasat_annex@yahoo.com.hk';
- $mail->Password = 'satellite20!5';
- $mail->SMTPSecure = 'tls';
- $mail->From = 'Asiasat_annex@yahoo.com.hk';
- $mail->FromName = 'Spectrum Management';
- $mail->addAddress($_POST['Receive']);
- if (isset($_POST['Receive2']))
- $mail->addAddress($_POST['Receive2']);
- $mail->WordWrap = 50;
- $mail->isHTML(true);
- $mail->Subject = $_POST['Subject'];
- $mail->Body = $_POST['Content'];
- if(!$mail->send()) {
- echo '<h4>Post failed: Message could not be sent.</h4>';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo '<h4>Post successfully: Message has been sent</h4>';
- }
- }
- $_POST['Receive']="";
- $_POST['Receive2']="";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement