![]() |
How use the gmail SMTP for sending email - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: How use the gmail SMTP for sending email (/showthread.php?tid=37342) Pages:
1
2
|
How use the gmail SMTP for sending email - El Forum - 01-09-2011 [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()); } } } ?> How use the gmail SMTP for sending email - El Forum - 01-09-2011 [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"; How use the gmail SMTP for sending email - El Forum - 01-09-2011 [eluser]Cristian Gilè[/eluser] @programmer: crlf is valid option. In the email library there is a set_crlf called during the inizialization. Cristian Gilè How use the gmail SMTP for sending email - El Forum - 01-09-2011 [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. How use the gmail SMTP for sending email - El Forum - 01-10-2011 [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 |