0

i've already done my own research on this subject. But no topics, or forums helped me. So I repost fo myself. Everything is in the title. I'm working for a website with MAMP Pro. I'm on OS el Capitan. And i want to send emails with php using my personal gmail address.

What i tried for it work: In Mamp Pro: mamp-configuration

Main.cf: main.cf

sasl_MAMP_passwd:

smtp.gmail.com:587 myadress@gmail.com:mygmailcode

php.ini:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 587

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

The error when i try to send email:

Jun  4 14:38:04 xxxxx postfix/smtp[3825]: warning: connect to private/tlsmgr: Connection refused
Jun  4 14:38:04 xxxxx postfix/smtp[3825]: warning: problem talking to server private/tlsmgr: Connection refused
Jun  4 14:38:05 xxxxx postfix/smtp[3825]: warning: connect to private/tlsmgr: Connection refused
Jun  4 14:38:05 xxxxx postfix/smtp[3825]: warning: problem talking to server private/tlsmgr: Connection refused
Jun  4 14:38:05 xxxxx postfix/smtp[3825]: warning: no entropy for TLS key generation: disabling TLS support
Jun  4 14:38:05 xxxxx postfix/smtp[3825]: EB1DE2C897A: TLS is required, but our TLS engine is unavailable
Jun  4 14:38:05 xxxxx postfix/smtp[3825]: EB1DE2C897A: to=<myadress@gmail.com>, relay=smtp.gmail.com[XX.XXX.XXX.XXX]:587, delay=2.7, delays=1.1/1.1/0.51/0, dsn=4.7.5, status=deferred (TLS is required, but our TLS engine is unavailable)

It's been 1 week i try to do my best for it work. But impossible. Thanks for help.

Userlambda
  • 85
  • 1
  • 11
  • rather then trying to configure your MAMP to get it done (which you'll need to do all over once you go live, or if you change your dev server) I would suggest working with Switmailer, and use their SmtpTransport. This is done inside php and should work on every serevr. Plenty of info out there: http://swiftmailer.org/docs/sending.html – Pevara Jun 04 '16 at 13:47
  • @Pevara , thanks I'm reading the documentation. i will test that solution. I hope I will not have trouble with that. And when i will upload the website, I will not have to reconfigure settings ? – Userlambda Jun 04 '16 at 15:44
  • It should be fairly straight forward, and if you get stuck there is plenty of information out there, or you can ask a new question here. It is used by most popular php frameworks and is by far the best and easiest php mail library I have ever come across. – Pevara Jun 04 '16 at 15:51
  • @Pevara hi it's me again. I try swift mailer, and i got a problem: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.gmail.com [ #0]' – Userlambda Jun 05 '16 at 15:53
  • Have a look at this perhaps: http://stackoverflow.com/questions/3478906/using-phps-swiftmailer-with-gmail or ask a new question if you are really stuck – Pevara Jun 05 '16 at 16:05
  • Issues fixed, it works. Thank you @Pevera. – Userlambda Jun 05 '16 at 16:31
  • Just to tell you. The issue came from gmail application. She was blocking my access. I allowed less secure apps access to my account. – Userlambda Jun 05 '16 at 16:37

0 Answers0