Created
August 27, 2020 04:19
-
-
Save cesgarma/ca050ea31c614d8e5353519234e9dd1e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://www.tutorialfor.com/questions-92660.htm | |
Install MailCatcher | |
Try entering the following command in the terminal. | |
* Do not enter the leading $. It's like rules for writing code | |
$sudo gem install mailcatcher | |
Installation will be completed after a while. Next, start MailCatcher. | |
$mailcatcher | |
Run it | |
$mailcatcher | |
Starting MailCatcher | |
==>smtp: //127.0.0.1: 1025 | |
==>http://127.0.0.1:1080 | |
*** MailCatcher runs as a daemon by default.Go to the web interface to quit. | |
I think it looks like this. MailCatcher is now started. Try accessing http://127.0.0.1:1080 for a trial. A screen that I've never seen before appears. | |
To quit MailCatcher, click Quit in the upper right corner of http://127.0.0.1:1080. | |
Check where the catchmail command is installed | |
Execute the following command in the terminal. | |
$which catchmail | |
And then | |
$which catchmail | |
/Users/example/.anyenv/envs/rbenv/shims/catchmail | |
Make a note of where the catchmail command is. Used for MAMP settings. | |
MAMP settings | |
Launch MAMP and click PHP on the left menu. | |
I think there is a pull-down menu labeled Default version at the top. Next to it is an icon with a → in the circle. Click it. | |
When you click on the icon, php.ini will be launched in a text editor. Press ⌘ + f to display the search bar and search for "mail function". Then, the following parts are found, so rewrite smtp_port and sendmail_path. | |
[mail function] | |
;For Win32 only. | |
;http://php.net/smtp | |
SMTP = localhost | |
;http://php.net/smtp-port | |
smtp_port = 25 | |
;For Win32 only. | |
;http://php.net/sendmail-from | |
;sendmail_from = [email protected] | |
;For Unix only. You may supply arguments as well (default: "sendmail -t -i"). | |
;http://php.net/sendmail-path | |
;sendmail_path = | |
Replace | |
↑ with ↓. | |
[mail function] | |
;For Win32 only. | |
;http://php.net/smtp | |
SMTP = localhost | |
;http://php.net/smtp-port | |
smtp_port = 1025 | |
;For Win32 only. | |
;http://php.net/sendmail-from;sendmail_from = [email protected] | |
;For Unix only. You may supply arguments as well (default: "sendmail -t -i"). | |
;http://php.net/sendmail-path | |
sendmail_path = /usr/bin/env /usr/local/bin/catchmail -f [email protected] | |
After rewriting, save it with ⌘ + s and restart MAMP. Replace/Users/example/.anyenv/envs/rbenv/shims/catchmailwith what you looked up in$which catchmail. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment