How use the gmail SMTP for sending email |
[eluser]hansfahlen[/eluser]
[quote author="Cristian Gilè" date="1294338587"]It seems a known issue that has been fixed after setting Code: $config['newline'] = "\r\n"; Hi, im having the same problem(:\wamp\www\ci\system\libraries\Email.php on line 1818). Where shall i put $config['newline'] = "\r\n"; $config['crlf'] = "\r\n";? my code looks like this: <?php class Email extends Controller { function index() { $this->load->library('email'); $config['protocol'] = 'smtp'; $config['smtp_host'] = 'smtp.gmail.com'; $config['smtp_user'] = '[email protected]'; $config['smtp_pass'] = '******'; $config['smtp_port'] = 465; $config['newline'] = "\r\n"; $config['crlf'] = "\r\n"; $this->email->initialize($config); $this->email->from('[email protected]', 'Your Name'); $this->email->to('[email protected]'); $this->email->cc(''); $this->email->bcc(''); $this->email->subject('Email Test'); $this->email->message('Testing the email class.'); if($this->email->send()) { echo 'Your email was sent, fool.'; } else { show_error($this->email->print_debugger()); } } } ?>
[eluser]cideveloper[/eluser]
This is what I have in my email.php. I have tried all the other variations and this one has always worked. Code: $config['protocol']="smtp"; I have never even seen Code: $config['crlf'] = "\r\n";
[eluser]Cristian Gilè[/eluser]
@programmer: crlf is valid option. In the email library there is a set_crlf called during the inizialization. Cristian Gilè
[eluser]cideveloper[/eluser]
[quote author="Cristian Gilè" date="1294643302"]@programmer: crlf is valid option. In the email library there is a set_crlf called during the inizialization. Cristian Gilè[/quote] Oh geez...my bad. Completely didn't look at that.
[eluser]hansfahlen[/eluser]
yeah but where shall i put : $config[‘newline’] = “\r\n”; $config[‘crlf’] = “\r\n”; then? And does it work with Wamp-server |
Welcome Guest, Not a member yet? Register Sign In |