Unable to send emails with MAMP |
[eluser]Wit07[/eluser]
Hi there, After several hours seeking on the web, I didn't solve my issue: I can't send emails using CI running on MAMP free. Here is my config: Code: $config = array(); I got an infinitive loop and nothing is printed into my log... I enabled SSL on MAMP and added these lines to php.ini: Code: [mail function] Also, a command line such as Code: echo "test" | mail -s "subject" [email protected] Do you have any idea? Cheers
[eluser]ortwin.van.vessem[/eluser]
Please read this blog post to enable postfix: http://benjaminrojas.net/configuring-pos...tain-lion/ This was the solution for me.
[eluser]Wit07[/eluser]
Thank for your answer ortwin.van.vessem. Now I get an error into my log: Failed to send AUTH LOGIN command. Error: 530 5.7.0 Must issue a STARTTLS command first. a1sm58176507eem.1 - gsmtp Can you tell me how did you set up your different files (php.ini, main.cf and CI source file)?
[eluser]Wit07[/eluser]
Finally I found the solution: Send emails with MAMP (mail() PHP function) 1. Set up SSL: http://soundsplausible.com/2012/01/14/en...amp-2-0-5/ 2. Set up Postfix: http://benjaminrojas.net/configuring-pos...tain-lion/ 3. Into MAMP's php.ini (glance phpinfo() to know which version is used and conclude into which folder you need to edit), comment lines SMTP, smtp_port and sendmail_from. Uncomment line sendmail_path and set /usr/sbin/sendmail -t -i as new value. You should be able to send emails now, if PostFix works fine (run test given in tutorial above). Send emails with CI To send emails with CI, you don't need to write your logins into a file for PostFix. However, you need to be able to run PostFix and SSL. Here is an example of config file for a google account: Code: $config['protocol'] = "smtp"; Be careful with " " which are necessary, ' ' could create issues. Here I'm using a TLS connection. If you prefer SSL, use port 465 and fix correctly smtp_crypto value. |
Welcome Guest, Not a member yet? Register Sign In |