Welcome Guest, Not a member yet? Register   Sign In
sendmail email not working
#1

[eluser]Zocee[/eluser]
I'm getting problem in sending email. CI script says email sent but i'm not getting email in my inbox as well as spam.

In this server general PHP mail() function is working. I used to use phpmailer class previously but it is also now working good. Now i've shifted to Codeigniter and its not sending email.

I've changed the server to another one but in this new server also same problem. General php mail function and class phpmailer is working but not CI mail.

Please help me.


==================
Controller function is like follows:

function emailchk(){
$this->load->library('email');
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$config['useragent'] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)";

$this->email->initialize($config);
$this->email->from('[email protected]', 'my friend name');
$this->email->to('[email protected]');
$this->email->subject('Email Test Subject');
$this->email->message('Testing the email body');
$this->email->send();
echo $this->email->print_debugger();
}


==================
Output of debugger is:

Your message has been successfully sent using the following protocol: sendmail

User-Agent: CodeIgniter
Date: Sun, 8 Aug 2010 23:48:03 -0500
From: "friendname"
Return-Path:
To: [email protected]
Subject: =?iso-8859-1?Q?Email_Test_Subject?=
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 (.NET CLR 3.5.30729)
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Testing the email body

==================

Please tell me where i'm wrong. please note: i've changed the email address to unreal emails

Thank you for reading till end.


Messages In This Thread
sendmail email not working - by El Forum - 08-08-2010, 11:00 PM
sendmail email not working - by El Forum - 08-08-2010, 11:03 PM
sendmail email not working - by El Forum - 08-09-2010, 12:34 AM
sendmail email not working - by El Forum - 08-09-2010, 12:43 AM
sendmail email not working - by El Forum - 08-09-2010, 12:45 AM
sendmail email not working - by El Forum - 10-06-2010, 05:40 AM
sendmail email not working - by El Forum - 10-13-2010, 01:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB