透過gmail的smtp伺服器寄信
2012-09-17 00:20:42 +0800 由 Rexable
在 Ruby on Rails 節點 中發起
最後由 Rexable 於2012-09-17 10:16:25 +0800回應
, 215次閱讀
如果透過gmail的smtp伺服器寄信的話,
是不是設定的帳號是什麼,寄件人就會顯示那個帳號名?
能夠設定一個類似[email protected]之類的假名嗎?
在app/mailer/users_mailer.rb裡設default :from => "[email protected]"似乎沒用,
在config/initializers/devise.rb裡設定config.mailer_sender也不行。
截至 2012-09-17 10:16:25 +0800,共收到 2 條回應
GGD
1樓, 於2012-09-17 01:24:11 +0800回應
app/mailer/users_mailer.rb 裡面:
default from: '"假名" <[email protected]>'
Rexable
2樓, 於2012-09-17 10:16:25 +0800回應
這樣不行耶,從收信方那裡看還是顯示本來的名字,
另外一樓這個說法是代表郵件位址一定沒法改了是嗎?
除非我自己架smtp伺服器?