如何安全发送验证邮件?
我们使用 Rails 3.0.X 并在 Heroku 上运行我们的 Web 应用程序。我们使用的是 Google Apps 免费版 它运行 Gmail 作为我们的电子邮件服务。我们的应用程序允许最终用户通过电子邮件注册。之后,我们向用户发送一封电子邮件验证,以证明他拥有其注册时使用的电子邮件地址。
今天,几个用户同时注册了,Gmail 没有发送验证电子邮件,而是将其标记为垃圾邮件。正如其信息页面所述:
在 Gmail,我们非常努力 打击垃圾邮件。这不仅包括 垃圾邮件进入 Gmail,但垃圾邮件正在 也是从 Gmail 发出的。相信 无论是否,垃圾邮件发送者都会注册 Gmail 大量地址只是为了 发送垃圾邮件!帮助尽我们的一份力量 让这些垃圾远离互联网,我们 我们确信的退回邮件是 垃圾邮件。不幸的是,我们并不完美 并且偶尔会反弹 合法邮件。我们对此表示歉意 带来不便。
有多种方法可以 无意中混淆了我们的自动化 垃圾邮件过滤器,通过发送 看起来可疑或垃圾邮件的文本,用于 例子。迄今为止最常见的 问题是将邮件抄送/密送至 大量收件人(“批量 邮件”)发送新闻通讯, 邀请函等,因为发送了垃圾邮件 对于许多收件人来说,我们的垃圾邮件过滤器是 稍微更容易混淆批量 含有垃圾邮件的邮件。
我给他们发了一封电子邮件解释我们的问题。如果我们不发送验证电子邮件,这会如何阻碍我们的业务。我还没有收到他们的消息。
同时,我使用 Gmail 电子邮件服务器发送电子邮件是否有误?我们应该使用自己的邮件服务器而不是 gmail 服务器吗?我注意到 Heroku 有一个名为 Sendgrid 的插件。我应该倾向于使用此服务来发送验证电子邮件吗?
We are using Rails 3.0.X and running our web app on Heroku. We are using Google Apps Free edition which runs Gmail as our email service. Our app allows end-users to sign up via email. After which, we send the user an email verification to prove that he owns the email address he registered with.
Today, several users signed up at once, and instead of Gmail sending out the verification emails, it marked them as spam. As quoted from their info page:
Here at Gmail, we work very hard to
fight spam. This includes not only
spam coming into Gmail but spam being
sent out from Gmail as well. Believe
it or not, spammers sign up for Gmail
addresses in large numbers just to
send out spam! To help do our part to
keep this junk off of the internet, we
bounce mail that we are confident is
spam. Unfortunately, we aren't perfect
and will occasionally bounce
legitimate mail. We apologize for the
inconvenience.There are a number of ways you can
inadvertently confuse our automated
spam filter, by sending
suspicious-looking or spammy text, for
example. By far the most common
problem is sending mail cc/bcc'd to
large numbers of recipients ("bulk
mail") to send out newsletters,
invitations, etc. Since spam is sent
to many recipients, our spam filter is
slightly more likely to confuse bulk
mail with spam.
I sent them an email explaining our problem. And how this could hinder our business if our verification emails are not sent out. I have yet to hear from them.
In the meantime, is it wrong that I am using Gmails email server to send out emails? Should we use our own mail server rather than the gmail server? I notice that Heroku has an addon called Sendgrid. Should I be inclined to use this service for sending verification emails instead?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般来说,我发现如果你可以使用 heroku 插件来做到这一点,那么你应该这样做。 sendgrid 的免费选项允许每天发送 200 封邮件,这对您来说可能足够了 - 如果还不够,那么您做得很好并且可以负担升级费用:) 根据我的经验,与其他插件相比,花在 Heroku 插件上的钱是非常值得的。开发人员寻求替代解决方案的时间成本。
Generally i find that if you can do it with a heroku addon then you should do that. The free option for sendgrid allows 200 mails a day which is probably enough for you - if it isn't then you're doing well and can afford the upgrade :) In my experience money spent on heroku addons is well worth it compared to the cost of developer time in seeking an alternate solution.