[英]Nuxt-mail works in local but not in online hosting
I configured Nuxt-mail to use an external mail server (from the hosting provider) like this:我将 Nuxt-mail 配置为使用外部邮件服务器(来自托管服务提供商),如下所示:
I send the email like the following (test both with Axios and not):我发送如下电子邮件(使用 Axios 测试和不测试):
Everything works fine when I try it from my computer (localhost) as you can see here:当我从我的计算机(本地主机)尝试时一切正常,如您在此处看到的:
But it fails when I try from the online website:但是当我从在线网站尝试时它失败了:
The Nuxt app is up as static website, I don't know if it makes a difference. Nuxt 应用程序作为静态网站启动,我不知道它是否有所作为。 Do you have any idea how to solve this?
你知道如何解决这个问题吗?
Thanks a lot.非常感谢。
I recommend doing a quick search .我建议进行快速搜索。
You'll notice what you're trying to achieve (static website) is not feasible.您会注意到您想要实现的目标(静态网站)是不可行的。 You will indeed need a running node.js server.
您确实需要一个正在运行的 node.js 服务器。
PS: websites like Netlify and Vercel do not allow for such thing. PS:像 Netlify 和 Vercel 这样的网站不允许这样的事情。
It works locally because you have a webpack dev server running when using your project locally.它在本地工作,因为在本地使用项目时,您有一个 webpack 开发服务器正在运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.