Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $email = 'myemail@gmail.com';
- $password = '4aea798c-4670-4ba9a4ecce00';
- $to_id = 'contact@myemail.com';
- $message = 'hello';
- $subject = 'hello@12';
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'smtp25.elasticemail.com';
- $mail->Port = 25;
- $mail->SMTPSecure = 'tls';
- $mail->SMTPAuth = true;
- $mail->Username = $email;
- $mail->Password = $password;
- // Email Sending Details
- $mail->addAddress($to_id);
- $mail->Subject = $subject;
- $mail->msgHTML($message);
- // Success or Failure
- if (!$mail->send()) {
- $error = "Mailer Error: " . $mail->ErrorInfo;
- echo '<p id="para">'.$error.'</p>';
- }
- else {
- echo '<p id="para">Message sent!</p>';
- }
- ?>
Add Comment
Please, Sign In to add comment