Issue sending mail via PHPMailer using gmail SMTP

Hi Team,

I am not getting any error is sending email via PHPMailer but unable to receive email in my INBOX. The same code works fine on other hosting account. I have read all the FAQ’s Knowledge base and followed the the give step’s but it did not work.

PFB - The PHPMailer code for your reference.



		if(	isset($_POST['submit'])){
			require 'assets/vendor/phpmailer/PHPMailerAutoload.php';
			$mail = new PHPMailer;
			$mail->Username='[email protected]';
			$mail->addAddress('[email protected]');
			$mail->Subject='Form Submission: '.$_POST['subject'];
			$mail->Body='<h1 align=center>Name:'.$_POST['name'].'<br>Email: '.$_POST['email'].'<br>Message: '.$_POST['msg'].'</h1>';

				$result="Something went wrong. please try again.";
				$result="Thanks! ".$_POST['name']." For contacting us we will get back soon";

<!DOCTYPE html>
<html lang="en">

<h1> Thank you for contacting us we willl get back to you soon</h1>



So you’re using one Gmail account to send to that same Gmail account? I believe Gmail filters out those messages and only stores them in the Sent folder.

I would recommend to use a second account for the sending and see if that works.

Also, you’re using the email address filled in by the user as the From address. Most email providers are quite picky with the sending address you provide, and won’t let you send email from an address you don’t control. That’s why our official contact form example uses your own domain as the sender address, not the address enter by the visitor.


It did not work … Still facing the same issue.

Plz share the php mailer script which works on infinity free account with Gmail SMPT …

I have tried downloading the php mailer setup share by u on above message of GitHub account but that code have some issue with capture verification issue the image doesn’t appear…


Do we get one email account on free hosting accout at zero cost with

You can’t add new email accounts on free hosting at the moment. Also, it’s, and not!


Request u to help me with the above comment

Plz try to search for it yourself first? We didn’t exactly try to hide it. It’s in an announcement post in this forum and visible on our public GitHub page:


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.