尝试将电子邮件发送到包含动作邮件中特殊字符的电子邮件ID时,我收到此异常。
电子邮件ID类似于chris_schröpfer@example.com
错误回溯
Net :: SMTPFatalError:550 5.1.1< =?UTF-8?B?Y2hyaXN0aWFuX3NjaHLDtnBmZXJAbWNraW5zZXkuY29t?=>:收件人地址被拒绝:本地收件人表中的用户未知
from /usr/local/lib/ruby/2.0.0/net/smtp.rb:950:in `check_response'
from /usr/local/lib/ruby/2.0.0/net/smtp.rb:919:in `getok'
from /usr/local/lib/ruby/2.0.0/net/smtp.rb:862:in `rcptto'
from /usr/local/lib/ruby/2.0.0/net/smtp.rb:843:in `block in rcptto_list'
from /usr/local/lib/ruby/2.0.0/net/smtp.rb:841:in `each'
from /usr/local/lib/ruby/2.0.0/net/smtp.rb:841:in `rcptto_list'
from /usr/local/lib/ruby/2.0.0/net/smtp.rb:662:in `send_message'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/network/delivery_methods/smtp.rb:113:in `block in deliver!'
from /usr/local/lib/ruby/2.0.0/net/smtp.rb:520:in `start'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/message.rb:2129:in `do_delivery'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/message.rb:232:in `block in deliver'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:456:in `block in deliver_mail'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/notifications.rb:159:in `block in instrument'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/notifications.rb:159:in `instrument'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/actionmailer-4.0.2/lib/action_mailer/base.rb:454:in `deliver_mail'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/message.rb:232:in `deliver'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/devise-3.2.2/lib/devise/models/authenticatable.rb:173:in `send_devise_notification'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/devise_invitable-1.3.2/lib/devise_invitable/model.rb:157:in `deliver_invitation'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/devise_invitable-1.3.2/lib/devise_invitable/model.rb:126:in `invite!'
from (irb):3
from /srv/foo/shared/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands/console.rb:90:in `start'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands/console.rb:9:in `start'
from /srv/foo/shared/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:62:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'irb(main):004:0>
答案 0 :(得分:3)
错误的原因是它是无效的电子邮件地址。 ö是不被允许的。
有关允许的内容,请参阅此相关答案:https://stackoverflow.com/a/2049510/17773