![]() |
can't send smtp email with google apps email - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: can't send smtp email with google apps email (/showthread.php?tid=5946) |
can't send smtp email with google apps email - El Forum - 02-08-2008 [eluser]chrisco23[/eluser] Hi all, I'm having trouble getting any email to go out when trying to use one of my google apps email accounts. I have these accounts working in Thunderbird just fine, and I use imap.gmail.com, port 993, SSL for inbound email, and smtp.gmail.com, port 587, TLS, outbound. I only need outbound mail from my Code Igniter website though. Can anyone help? My /application/config/email.php settings are: Code: $config['protocol'] = 'smtp'; Thanks! Chris can't send smtp email with google apps email - El Forum - 02-08-2008 [eluser]wiredesignz[/eluser] I may be mistaken, but smtp relay might not be allowed through gmail. On the other hand it may require your proper gmail account details for smtp_user. can't send smtp email with google apps email - El Forum - 02-08-2008 [eluser]chrisco23[/eluser] I've got the fire mostly put out by using PHPMailer class. Still, would like to know if this could be accomplished in a more native CI fashion. thx. can't send smtp email with google apps email - El Forum - 03-06-2009 [eluser]bd3521[/eluser] Any luck with sending via gmail or google apps with CI? can't send smtp email with google apps email - El Forum - 03-06-2009 [eluser]chrisco23[/eluser] Like I said in my post from a year ago, I had success with PHPMailer http://sourceforge.net/projects/phpmailer/ I use the PHPMailer class and the SMTP class. Here's a send method I have. Just modify this to suit your needs. Obviously make sure $_POST is clean etc. Code: public function send() { can't send smtp email with google apps email - El Forum - 03-07-2009 [eluser]Crimp[/eluser] I managed to get away from the PHPMailer plug-in by using this config with the CI class: Code: 'protocol' => 'smtp', can't send smtp email with google apps email - El Forum - 11-20-2009 [eluser]randomdriver[/eluser] Call me stupid, when I read this: http://ellislab.com/codeigniter/user-guide/libraries/email.html It mentions add the $config array in that file... OK. So and array that looks like? $config['value'] = 'some value'; Or $config = array('value1, value2); I tried the first and get an ugly error about headers being sent out etc. I too am trying to get my app to send emails via a Google Account. can't send smtp email with google apps email - El Forum - 05-10-2011 [eluser]Unknown[/eluser] Hi, I realise this is an old thread but the issue still seems to exist. After playing around I found that if i did not have the following line the send would just hang: 'newline' => "\r\n" If I add it in the send works fine. My full config: $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'ssl://smtp.googlemail.com', 'smtp_port' => 465, 'smtp_user' => 'support@*****', 'smtp_pass' => '*****', 'charset' => 'iso-8859-1', 'newline' => "\r\n" ); $this->load->library('email', $config); I tested several times and the 'newline' was the difference between it working or not. can't send smtp email with google apps email - El Forum - 05-10-2011 [eluser]Unknown[/eluser] earned!!! ysadba.org[/size][/size] |