简体   繁体   English

mailCatcher的用途是什么?

[英]What's the use of mailCatcher?

I'm working on a spring bot application , i want to send notification to my user's gmail account , i found many useful tutorial about that , so i tried working on it .. 我正在使用spring bot应用程序,我想将通知发送到用户的gmail帐户,我发现了很多有用的教程,因此我尝试进行操作..

But i saw in some forum that i should use mailCatcher instead , i tried to understand what it stands for but there is a lot of a little bit different explanations . 但是我在某个论坛上看到我应该改用mailCatcher,我试图理解它的意思,但是有很多不同的解释。

So my questions are : 所以我的问题是:

do i really need MailCatcher ? 我真的需要MailCatcher吗?

As i know mailcatcher can only help us debug and see our messages sent even thought these emails doesnt exists in reality , isnt it ? 我知道mailcatcher只能帮助我们调试并查看发送的消息,即使这些电子邮件实际上并不存在,不是吗?

Does MailCatcher catches mails and deliver it again for exemple to gmail accounts ? MailCatcher是否会捕获邮件并再次将其重新发送给gmail帐户? ( supposed im using real emails..) ? (假设我使用真实的电子邮件..)?

Using gmail api pushs us to activate some security condition in our account for the whole app as i saw in some questions .. , how can we avoid that , or is it necassery ? 正如我在某些问题中看到的那样,使用gmail api会促使我们在整个应用程序的帐户中激活某些安全性条件,如何避免这种情况呢?

I wish i could get some good answers about this. 我希望我能对此得到一些好的答案。

Thank you in advance . 先感谢您 。

No. To send mail, you dont' need MailCatcher. 不。要发送邮件,您不需要MailCatcher。

MailCatcher is used to check whether you are going to send correct mails. MailCatcher用于检查您是否要发送正确的邮件。

MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface. MailCatcher运行一个超级简单的SMTP服务器,该服务器捕获发送给它的任何邮件以在Web界面中显示。 Run mailcatcher, set your favourite app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server, then check out http://127.0.0.1:1080 to see the mail that's arrived so far. 运行mailcatcher,将您喜欢的应用程序设置为传递到smtp://127.0.0.1:1025,而不是默认的SMTP服务器,然后查看http://127.0.0.1:1080,以查看到目前为止已收到的邮件。

To send email, you need another server, which can really send mail for you, and an account on the sever. 要发送电子邮件,您需要另一台服务器(该服务器可以真正为您发送邮件)和一个服务器。 You can run this sever by your self, or use public server, like google. 您可以自行运行此服务器,也可以使用公共服务器(例如Google)。 But do please not send spams. 但是请不要发送垃圾邮件。

On the other hand 另一方面

send notification to my user's gmail account 发送通知到我的用户的Gmail帐户

doesn't means "send mail". 并不意味着“发送邮件”。 You should consider, do you send email, or just notification. 您应该考虑,发送电子邮件还是只是通知。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM