Welcome Guest, Not a member yet? Register   Sign In
Problem with Email Sending
#1

[eluser]hasokeric[/eluser]
Quote:Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\_projects\FINAL\system\libraries\Email.php on line 1812

My Model (Function Part OF IT)
Code:
function SendMail($email)
    {
      $this->load->library('email');
      $config['protocol'] = 'smtp';
      $config['smtp_host'] = 'smtp.pssmagazin.com';
      $config['smtp_user'] = '[email protected]';
      $config['smtp_pass'] = 'hiddenpass';
      $config['charset'] = 'UTF-8';
      $config['wordwrap'] = TRUE;
      
      $this->email->initialize($config);
      
      $this->email->from('[email protected]');
      $this->email->to($email);

      $this->email->subject('Email Test');
      $this->email->message('WooooooHoooo');

      $this->email->send();
      
echo $this->email->print_debugger();
    
    }

Called from Controller for testing purpose via
Quote: // It is loaded in the constructor
function testmail() { $this->Reg_Model->SendMail('[email protected]'); }

If you telnet smtp.pssmagazin.com 25 the connection is there
#2

[eluser]hasokeric[/eluser]
Weird it has been fixed after setting
Code:
$config['newline'] = "\r\n";
$config['crlf'] = "\r\n";

- I believe this is a CI bug ?
#3

[eluser]firefoxchris[/eluser]
This works perfectly! Yes it is a known bug, I have updated the big tracker with your fix. Many many thanks!

http://codeigniter.com/bug_tracker/bug/3407/
#4

[eluser]InsiteFX[/eluser]
This is not a CodeIgniter bug, read the user guide.

Code:
crlf \n "\r\n" or "\n" or "\r" Newline character. (Use "\r\n" to comply with RFC 822).
newline \n "\r\n" or "\n" or "\r" Newline character. (Use "\r\n" to comply with RFC 822).

Enjoy
InsiteFX
#5

[eluser]firefoxchris[/eluser]
I stand corrected, I thoguht it was odd that the plugin worked with one server and not with another. Either way the above code does 'workaround' the problem talking to some smtp servers.




Theme © iAndrew 2016 - Forum software by © MyBB