Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,201,503 members, 7,978,667 topics. Date: Friday, 18 October 2024 at 12:12 PM |
Nairaland Forum / Science/Technology / Programming / Please I Need Some One To Help Me Out With Phpmailer (840 Views)
Pls I Need Some Help / How Much Do You Charge For Your Mobile App creation I need some app developers / All The IT Savys In Here I Need Some Advice 911 (2) (3) (4)
(1) (Reply)
Please I Need Some One To Help Me Out With Phpmailer by KosiKinq(m): 10:59pm On Jun 08, 2017 |
Please am having issue sending verification link to my users E-mail via phpmailer am using cpanel i dont know if there is any settings that am missing in my cpanel or code(Which am not sure) <?php error_reporting(E_ALL); require '/home/user/public_html/phpmailer/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->isSMPT(); $mail->Host = 'smpt.gmail.com'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = '*****@gmail.com'; // SMTP username $mail->Password = 'password'; // SMTP password $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 587; // TCP port to connect to 587 $mail->SMPTDebug = 4; $mail->setFrom('******@gmail.com', 'Hello whats happening'); $mail->addAddress('****@gmail.com'); // Add a recipient // $mail->addAddress('ellen@example.com'); // Name is optional $mail->addReplyTo('itskosieric@gmail.com'); //$mail->addCC('cc@example.com'); //$mail->addBCC('bcc@example.com'); //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'hi just wanted to say hello'; $mail->Body = '<p>This is the HTML message body <b>in bold!</b></p>'; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent'; } ?> it only tells me message sent when i comment $mail->isSMPT(); but doesn't send any E-mail....please i dont knpw where this problem might be coming from Thanks in advance |
Re: Please I Need Some One To Help Me Out With Phpmailer by zando64: 1:32pm On Jun 09, 2017 |
Contact me on 08034609308 |
Re: Please I Need Some One To Help Me Out With Phpmailer by LegendsCoded(m): 1:38pm On Jun 09, 2017 |
KosiKinq:my suggestions tho.. -- make sure send mail is enabled on your server some free webhosting platform does not support it. -- make sure your smtp credentials are correct |
(1) (Reply)
PHP Cookies For State Management / Again... I Will HOST Your Site For FREE... Call Me NOW / Jobs In An NGO
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 15 |