• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not receiving Emails: $this->email->send() vs. mail()

Hi all,

I have problems with receiving emails, sent out of a controller.

the email library is loaded and I also have an email configuration file under application/config/email.php

<?php defined('BASEPATH') OR exit('No direct script access allowed');

$config['protocol'] = 'mail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['priority'] = 1;

controller code:
$this->email->from('myemail@adress.com', 'My name');
$message = '<p>Test Message</p>';
$message .= '<p><a href="'.base_url().'">Click here</a></p>';

I also trying to send an email with this:
$receiver = 'myemailreceiver@adress.com';
$subject = 'Subject';
$message= 'The message';
$header = 'From: myemail@adress.com' . "\r\n" .
'Reply-To: myemail@adress.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($receiver, $subject, $message, $header)

Now the only email i am receiving it the email sent via mail() the other email sent via $this->email->send() does not arrive.

but $this->email->print_debugger() is telling that the email has successfully been sent.

what is the probleme here? can anyone please help me out?
(sorry for my bad english)

I think you and I might have same problem.


Let me know if you find anything. See what I gave done and let me know what happen s

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.