CodeIgniter Forums
Mail sending problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Mail sending problem (/thread-10411.html)



Mail sending problem - El Forum - 07-30-2008

[eluser]ummarbhutta[/eluser]
Hi I am having problem in sending email.. I have hosted my website on hostmonster.com and the following function is sending email to user.. but it doesn't get delivered.. and no error message is displayed...
Code:
function SendEmail($email)
    {
        $config['useragent'] = 'Test mail server';
        $config['mailtype'] = 'html';
        $config['validate'] = TRUE;

        $this->email->initialize($config);
        $this->email->from('[email protected]', 'web Registration');
        $this->email->to($email);

        $this->email->subject('Email confirmation required');

        $message = "Email body";

        $this->email->message($message);

        $this->email->send();

    }

Why it is so? Please help me as soon as possible?


Mail sending problem - El Forum - 07-30-2008

[eluser]andreagam[/eluser]
Did you set your mailpath correctly?
Code:
$config['mailpath'] = '/usr/sbin/sendmail -t -i';
Use your server specs. Maybe it just can't find sendmail...


Mail sending problem - El Forum - 07-30-2008

[eluser]ummarbhutta[/eluser]
Thanks let me try it...


Mail sending problem - El Forum - 07-30-2008

[eluser]ummarbhutta[/eluser]
I have tested it but it is not working yet!! :-S