can't send smtp email with google apps email |
[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
[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.
[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.
[eluser]bd3521[/eluser]
Any luck with sending via gmail or google apps with CI?
[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() {
[eluser]Crimp[/eluser]
I managed to get away from the PHPMailer plug-in by using this config with the CI class: Code: 'protocol' => 'smtp',
[eluser]randomdriver[/eluser]
Call me stupid, when I read this: http://ellislab.com/codeigniter/user-gui...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.
[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.
|
Welcome Guest, Not a member yet? Register Sign In |