我刚刚为我正在做的一个Laravel项目安装了Mailcatcher,我使用Virtual Box和Vagrant在本地运行应用程序。当我在终端上运行命令mailcatcher
时,我得到:
Starting MailCatcher
==> smtp://127.0.0.1:1025
/home/vagrant/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/thin-1.5.1/lib/thin/server.rb:104: warning: constant ::Fixnum is deprecated
==> http://127.0.0.1:1080
*** MailCatcher runs as a daemon by default. Go to the web interface to quit.
但是当我访问http://127.0.0.1:1080时,我得到了以下页面:
我的应用程序运行在www.example.com上,所以我也尝试使用它,但结果相同。我不完全确定它是否与我的本地主机或Mailcatcher有关,但在理想情况下,我希望通过如下URL运行它:192.168.10.10 so I also tried using that, but the same result. I'm not entirely sure if it's something to do with my localhost or Mailcatcher, but in an ideal world I'd like to run it off a URL like this: 192.168.10.10/mailcatcher
but I'm unsure how to set this up in my project. If I can just get the localhost to work I'd be happy - is there any other settings I need to change in order to make this work? Or is it that my localhost is not playing ball?
- 编辑:**
如果需要,我的Laravel项目中的. env文件具有以下邮件设置:
MAIL_DRIVER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_PRETEND=false
1条答案
按热度按时间nkoocmlb1#
遇到了同样的问题,这对我很有效。
mailcatcher --foreground
.