0

Hy everyone.I am facing strange issue in Simple Php Mail function.I am using codeignitor framework and using Default email library to send emails.Here is my code

$subject = "Become a Member of Room";
$message = "Hi Zeeshan";
$message.= "<a href='http://iqra.com.hk/sms/Member/activate/sdskdksn2n23kan92nns29/12'>Clickhere</a>";
$message.= "Room Invite is here";
$message.= "Regards,<br><br>";
$message.= "Demo School";
$this->sendEmail('myemail@gmail.com', $subject, $message,'Demo School');

Defination of sendEmail() Function

 function sendEmail($email,$subject,$message,$school){
    $this->load->library('email');
    $config['protocol'] = 'sendmail';
    $config['mailtype'] = 'html';
    $config['mailpath'] = '/usr/sbin/sendmail';
    $config['charset'] = 'iso-8859-1';
    $config['wordwrap'] = TRUE;
    $this->email->initialize($config);
    $this->email->from('no-reply@example.com',$school);
    $this->email->to($email);
    $this->email->subject($subject);
    $this->email->message($message);
    $this->email->send();

}

Now i am facing issue is that when i send email,email doesn't received.I tracked this issue and i find that http://iqra.com.hk/sms/ in Link is creating issue.When i remove http://iqra.com.hk/sms/ from

$message.= "<a href='http://iqra.com.hk/sms/Member/activate/sdskdksn2n23kan92nns29/12'>Clickhere</a>";

and make it like this

$message.= "<a href='Member/activate/sdskdksn2n23kan92nns29/12'>Clickhere</a>";

then email receives.So i am wondering Why email is not receiving by adding my domain name in Link?Please suggest me.

Shaniawan
  • 243
  • 2
  • 16
  • 1
    Well that would most likely be the spam filter on the receiving end ... maybe Google doesn’t like that domain, thinks it is malware/spam ... – CBroe Jan 30 '18 at 12:35
  • just because email is sent doesn't mean it's received. In fact probably about 80% of the process is out of your hands. I'd say the same, probably a spam filter. Not a great idea putting your real email addresses on the net btw, I guess now they'll get a lot more spam too. – ADyson Jan 30 '18 at 12:47

0 Answers0