Pretty straight forward here, I'd like to use MailTrap for devMode and then use an SMTP service (Mandrill or like) for production. I looked through the General Config Settings docs but didn't see anything that lent itself to being SMTP related. Is this possible?
Asked
Active
Viewed 619 times
4
Ryan Shrum
- 1,914
- 14
- 22
-
Shameless plug: We've written a plugin that automatically updates your email settings depending on your environment. It's not free, but it is cheap :-) Please check out the page on our website for more information. – Gaz Aug 02 '17 at 20:35
2 Answers
4
Not an easy way to do this in Craft 2, but this is possible in the upcomgin Craft 3 (currently in beta) using craft/config/app.php, which is multi-environment aware.
Brad Bell
- 67,440
- 6
- 73
- 143
2
If you're running Craft 3.7.22 or later, all SMTP-related email settings (except "Timeout") support environment variables.
Most SMTP related settings received environment variable support in Craft 3.1.0, excluding "Use authentication" and "Encryption Method" which only supports environment variables since Craft 3.7.22.
Mats Mikkel Rummelhoff
- 22,361
- 3
- 38
- 69