【问题标题】:rails 4 action mailer setting (SMTP) for webmail用于 webmail 的 rails 4 action mailer 设置 (SMTP)
【发布时间】:2015-05-19 15:04:43
【问题描述】:

我在这里遇到问题,我找不到任何 webmail 的 smtp 设置,经过几个小时我花了很多时间却什么也没有,我只是并且总是找到 gmail 设置,就像这样

# ActionMailer settings
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
  address: 'smtp.gmail.com',
  port: 587,
  domain: 'gmail.com',
  user_name: '*****@gmail.com',
  password: '******',
  authentication: 'plain',
  enable_starttls_auto: true}

有没有人知道如何为 webmail 配置它,,,

【问题讨论】:

    标签: email smtp webmail


    【解决方案1】:

    试试这个代码

    domain: 'smtp.gmail.com',
    

    【讨论】:

      【解决方案2】:

      SMTP 和 IMAP 设置您可以在这里找到http://docs.aws.amazon.com/workmail/latest/userguide/using_IMAP_client.html

      webmail 的 ActionMailer 配置示例:

      config.action_mailer.delivery_method = :smtp
      config.action_mailer.smtp_settings = {
        address:              'smtp.mail.us-west-2.awsapps.com',
        port:                 465,
        domain:               'example.com',
        user_name:            'support@example.com' ,
        password:             'WEBMAIL_PASSWORD_HERE',
        authentication:       'plain',
        ssl: true
      }
      
      config.action_mailer.default_options = { from: 'support@example.com' }
      

      address 取决于您的邮箱所在的位置。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-02-06
        • 1970-01-01
        • 1970-01-01
        • 2015-11-14
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多