9

I'm developing a site locally using MAMP + VirtualHostX on Mavericks. I'm at the point in the project where I want to create some user accounts for clients, but I can't seem to get my mail set up properly so Craft can send emails from my local environment.

Has anyone done this same thing? Any advice for getting Craft emails working on a similar local dev environment?

Thanks!

  • 1
    Hmm.. there was a user with similar problems some days ago. – carlcs Aug 19 '14 at 21:11
  • I had the same issue I was unable to resolve. Craft will send emails (same MAMP setup) on one computer but not the other. – Adam McCombs Aug 19 '14 at 21:12
  • @AdamMcCombs The Mandrill suggestion below from Stephen Lewis worked like a charm for me. You just have to change the email protocol setting in Craft to use SMTP and use the settings Mandrill provides once your account is set up. – Adam Snetman Aug 20 '14 at 0:47
14

These days I just use Mandrill.

It's simple to set up, free unless you're sending tens of thousands of emails, and you can continue to use it on any development (or production) machine without any configuration changes.

Just set the Mandrill SMTP settings in the Craft admin area, and you're done.

  • Thanks much Stephen. I've never used or heard of Mandrill before, but got it up and working in about 2 minutes. Great recommendation! – Adam Snetman Aug 19 '14 at 21:44
  • Glad I could help, Adam. – Stephen Lewis Aug 19 '14 at 21:46
  • 2
    is it possible to add those details to config rather than setting them in admin? – Steven Grant Dec 13 '14 at 9:32
  • @StevenGrant Doesn't look like it from the docs. There's nothing in the code to suggest you can, either. – Stephen Lewis Feb 2 '15 at 17:12
  • 1
    "On April 27, Mandrill became a paid MailChimp add-on. Any Mandrill accounts that weren't linked to a MailChimp account by May 11, 2016 have been disabled and can no longer be accessed." via mandrillapp.com – Masiorama Jul 27 '17 at 20:18
1

It's 2018, and as Masiorama mentioned, MandrillApp is no longer available for free. As a Windows user, the general "Get PHP Mail to work on localhost" solution detailed here worked for me.

Note: It requires a Gmail address, and that you paste your Gmail password into the php.ini file of your localhost server. Basically, you need to configure sendmail on localhost to use your Gmail account's SMTP service.

1

In Craft 3, you can use app.php file to connect to an external SMTP server.

Article on my blog craftSnippets describes how to do this. It deals with Mailtrap, fake SMTP server, but you can connect to any server that way.

http://craftsnippets.com/articles/testing-and-debugging-emails-sent-by-craft-cms-using-mailtrap

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.