从 Mandrill 接收入站电子邮件。
需要一个包含 Mandrill 入站电子邮件事件对象 JSON 数组的 mandrill_events 参数。每个事件的 msg 对象都应包含一个完整的 RFC 822 消息,其 raw_msg 属性。
返回值
- 
204 No Content:如果入站电子邮件已成功记录并排队以路由到相应的邮箱
- 
如果请求的签名无法验证,则返回 401 Unauthorized
- 
如果 Action Mailbox 未配置为接受来自 Mandrill 的入站电子邮件,则返回 404 Not Found。
- 
如果请求缺少必需的参数,则返回 422 Unprocessable Entity。
- 
如果 Mandrill API 密钥丢失,或者 Active Record 数据库、Active Storage 服务或 Active Job 后端配置错误或不可用,则返回 500 Server Error。
命名空间
    
  
  
    
    方法
    - C
- H
实例公共方法
create() 链接
源码: 显示 | 在 GitHub 上
# File actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb, line 20 def create raw_emails.each { |raw_email| ActionMailbox::InboundEmail.create_and_extract_message_id! raw_email } head :ok rescue JSON::ParserError => error logger.error error.message head ActionDispatch::Constants::UNPROCESSABLE_CONTENT end
health_check() 链接
源码: 显示 | 在 GitHub 上
# File actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb, line 28 def health_check head :ok end