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!

Adam Snetman
  • 939
  • 6
  • 16
  • 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 00:47

4 Answers4

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.

Stephen Lewis
  • 2,429
  • 11
  • 17
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.

Sandwich
  • 636
  • 5
  • 16
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

Piotr Pogorzelski
  • 1,286
  • 7
  • 18
1

If you are just testing email under MAMP try using ToolHeap Mail tool: Test Mail Server Tool. It will save you a lot of headaches. George Campbell