Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require '/var/www/html/PHPMailer-master/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'mail.smtp2go.com';
- $mail->SMTPAuth = true;
- $mail->Username = 'erickwasambo@gmail.com';
- $mail->Password = 'gGXJUvb7PdML';
- $mail->SMTPSecure = 'tls';
- $mail->From = 'sender@example.com';
- $mail->FromName = 'Your Name';
- $mail->addAddress('erick.wasambo@gmail.com');
- $mail->isHTML(true);
- $mail->Subject = 'Test Mail Subject!';
- $mail->Body = 'This is SMTP Email Test';
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement