phpmailer

Send html emails using PHPMailer and html templates

本秂侑毒 提交于 2019-12-12 09:16:32
问题 I'm trying to get the emails sent from my contact (using PHPMailer) sent in a nice html template (phtml actually). What works: I receive the html template so no issue with the transmission What does not work: The variables (message, phone number, etc) are not reflected in the body of my html template. I have tried several things in the html template, without success: <?= htmlspecialchars($message) ?> and #message# and <?php echo$_POST['message'] ?> What is the issue? Thanks, Here is the

SMTP error with PHPMailer EHLO not supported

时间秒杀一切 提交于 2019-12-12 09:06:52
问题 I have this code, which I want to use to send mails to my customers, PARAMETERS CENSORED ( *** ): include 'phpmailer/class.phpmailer.php'; $mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled $mail->Host = "smtp.email.it"; $mail->Port = 25; // or 587 465 $mail->IsHTML(true); $mail->SMTPSecure = 'tls'; $mail->Username = "***"; $mail-

Php mailer google smtp working on localhost not working on live site

梦想的初衷 提交于 2019-12-12 09:04:39
问题 I'm trying to send mail to registered user after registration. For that I m using phpmailer library. my code is as below: function smtpmailer($to, $from, $from_name, $subject, $body) { global $error; $username = "xyz@demo.net"; $password = "1234567"; $mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled $mail->SMTPSecure = 'ssl'; // secure

PHPMailer gives error “DATA END command failed” and “data not accepted” without further error explanation

[亡魂溺海] 提交于 2019-12-12 06:28:40
问题 I have tried to send email with this code (SMTP_HOST etc. are constants defined in config, they are all defined, it uses port 587): $txt = strip_tags(str_replace(array("<br>","<br\>","<br \>"),"\n",$this->_params['message'])); // some irrelevant code here (saves record) $mail = new PHPMailer; $mail->isSMTP(); $mail->Host = SMTP_HOST; $mail->Port = SMTP_PORT; $mail->SMTPAuth = true; $mail->Username = $mail->From = SMTP_USER; $mail->Password = SMTP_PASS; $mail->addReplyTo($this->_params['email'

Can't Send PHPMailer with Oauth Google

只谈情不闲聊 提交于 2019-12-12 05:48:47
问题 I have some problem. My code <?php require 'PHPMailer/PHPMailerAutoload.php'; $userEmail = "mail@mail.org"; $clientId = "xxxxxxxxx-xxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com"; $clientSecret = "xxxxxxxx-xxxxxxxxx"; $token = "1/xxxxxxxx-xxxxxxxx-5EmWcSmuvnRbJs"; $mailer = new PHPMailerOAuth; $mailer->isSMTP(); $mailer->Host = 'smtp.gmail.com'; $mailer->SMTPAuth = true; $mailer->AuthType = 'XOAUTH2'; $mailer->oauthUserEmail = $userEmail; $mailer->oauthClientId = $clientId; $mailer-

phpmailer does not connect to SMTP servers

蓝咒 提交于 2019-12-12 05:28:48
问题 i've been trying to use phpmailer and tried using live.com and gmail.com but it always can't connect to SMTP server. here's the full code (i've tried live.com using smtp.live.com but i get the same problem "Message could not be sent.Mailer Error: SMTP connect() failed.") require 'PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication

Unable load files within library in Codeigniter

纵然是瞬间 提交于 2019-12-12 04:48:06
问题 I've written a function within Controller to use PHPMailer and it works fine. After that I need this Function frequently and eventually I decide to write Library. But when do this and load Library within Controller, It has error like this : Message: Call to undefined method PHPMailerOAuth::isSMTP() After all I've figured out there is problem with path! I've tried what ever you're thinking but it doesn't work! I've tried Controller as library I've tried include() , require_once() , require ,

phpmailer SMTP error

为君一笑 提交于 2019-12-12 04:39:54
问题 I am using this php code to send email through gmail account . but its showing smtp error . I have googled it . but not found any specific answer . would anyone please help to find the solution ?? I have hosted this code in my webserver error : "SMTP Error: Could not connect to SMTP host. Message was not sent Mailer Error: SMTP Error: Could not connect to SMTP host.SMTP Error: Could not connect to SMTP host." code: <?php require("class.phpmailer.php"); $email = $_POST['email_address'];

Office365 via GoDaddy SMTP does not work

佐手、 提交于 2019-12-12 04:34:17
问题 I'm using PHPMailer and have tried others but this simply does not work. I keep getting an error that the server keeps denying me access. Here is the example code used: <?php require 'PHPMailerAutoload.php'; $mail = new PHPMailer; //$mail->SMTPDebug = 3; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'smtp.office365.com'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'xx@xx.com'; // SMTP

not receiving emails from php mail() function [duplicate]

 ̄綄美尐妖づ 提交于 2019-12-12 04:15:12
问题 This question already has answers here : PHP mail function doesn't complete sending of e-mail (26 answers) Closed 2 years ago . I have recently been learning HTML, js, CSS, and PHP through creating web pages and posting them on my apache2 server hosted on my raspberry pi with a no-ip.com address. My first real project for learning PHP has been creating a simple form to then send an email to me, but I keep running into the issue of the mail() function executing without any errors, but not