将邮件设置为“来自” Rails 中任意值
我发送邮件的电子邮件地址是[电子邮件受保护] ,当我发送邮件时:
mail(:from=>'[email protected]', :to=>"[email protected]", :subject=>"Welcome!")
Gmail中的from字段显示noreply,所以我尝试使用以下内容:
mail(:from=>'domain', :to=>"[email protected]", :subject=>"Welcome!", :return_path=>"[email protected]", :reply_to=>"[email protected]")
上面的返回:
554 Message refused.
我想要的是 from 字段说的是“MyDomain”之类的东西。那么我该怎么做呢?
谢谢!
My email address from which I deliver messages is [email protected], when I send message with:
mail(:from=>'[email protected]', :to=>"[email protected]", :subject=>"Welcome!")
from field in Gmail shows noreply, so I have tried using following:
mail(:from=>'domain', :to=>"[email protected]", :subject=>"Welcome!", :return_path=>"[email protected]", :reply_to=>"[email protected]")
above returns:
554 Message refused.
All I want is that from field was saying something like "MyDomain" or whatever. So how do I do this?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试使用
如果这不起作用,则添加带有键“FROM”的标头和以下格式的值:
Did you try using
If this doesn't work then add a header with key 'FROM' and value in following format: