Welcome Guest, Not a member yet? Register   Sign In
Unable to send emails with MAMP
#4

[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";
  $config['smtp_host'] = "smtp.gmail.com";
  $config['smtp_port'] = "587";
  $config['smtp_user'] = "*****";
  $config['smtp_pass'] = "*****";
  $config['smtp_crypto'] = "tls"; //very important line, don't remove it
  $config['smtp_timeout'] = "5"; //google hint
  $config['mailtype'] = "text";
  $config['charset']  = "utf-8";
  $config['newline'] = "\r\n";


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.


Messages In This Thread
Unable to send emails with MAMP - by El Forum - 08-12-2013, 07:10 AM
Unable to send emails with MAMP - by El Forum - 08-12-2013, 08:17 AM
Unable to send emails with MAMP - by El Forum - 08-12-2013, 08:33 AM
Unable to send emails with MAMP - by El Forum - 08-13-2013, 02:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB