Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include ("lib/PHPMailerAutoload.php");
- $sen_name = "";
- $sen_email = "";
- $rec_email = "";
- $email_sub = "";
- $box_msg = "";
- $mail = new PHPMailer();
- // Telling the class to use SMTP
- $mail->IsSMTP();
- $mail->Mailer = "smtp";
- $mail->Host = "smtp.mandrillapp.com";
- $mail->Port = 587;
- // Turn on SMTP authentication
- $mail->SMTPAuth = true;
- // SMTP Username
- $mail->Username = "";
- // SMTP Password ( i.e. Any valid Mandrill API key)
- $mail->Password = "";
- $rec_email = ""; // Your email address will be here
- $sen_name = $_POST[name];
- $email_sub = ""; // Your email subject will be here
- $sen_email = ""//$_POST[email];
- $box_msg = ""//$_POST[message];
- $mail->From = $sen_email;
- $mail->FromName = $sen_name;
- $mail->AddAddress($rec_email);
- $mail->Subject = $email_sub;
- $mail->Body = $box_msg;
- $mail->WordWrap = 50;
- if (($sen_email != "") && ($rec_email != "" )) {
- // Sending Email
- $status = $mail->Send();
- echo"Email Sent !";
- }
- else
- {
- echo"<p>The mail() function failed.</p>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement