半路出家的道士 2021-09-14 20:45 采纳率: 22.2%
浏览 58
已结题

gitlab 配置 smtp发送邮件失败

配置文件时按照官方来写的,应该不太可能有问题,下面是在控制台测试打印的数据,最后直接自动退出控制台,请懂的人帮忙看一下O(∩_∩)O谢谢


root@demo:/etc/gitlab# gitlab-rails console -e production
--------------------------------------------------------------------------------
 Ruby:         ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
 GitLab:       13.9.4 (4be21b77456) FOSS
 GitLab Shell: 13.17.0
 PostgreSQL:   12.5
--------------------------------------------------------------------------------
Loading production environment (Rails 6.0.3.4)
irb(main):001:0> Notify.test_email('user@demo.com.cn','title','body').deliver_now

Notify#test_email: processed outbound mail in 1.1ms
Delivered mail 61409743a0853_622554d83290@demo.mail (65.3ms)
Date: Tue, 14 Sep 2021 20:36:19 +0800
From: infivision <git@infivision.com.cn>
Reply-To: demo <noreply@www.demo.com.cn>
To: user@demo.com.cn
Message-ID: <61409743a0853_622554d83290@demo.mail>
Subject: title
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p>body</p></body></html>

Traceback (most recent call last):
        1: from (irb):1
Traceback (most recent call last):
    26: from bin/rails:4:in `<main>'
    25: from bin/rails:4:in `require'
    24: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/commands.rb:18:in `<top (required)>'
    23: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/command.rb:46:in `invoke'
    22: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/command/base.rb:69:in `perform'
    21: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
    20: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
    19: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
    18: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/commands/console/console_command.rb:102:in `perform'
    17: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/commands/console/console_command.rb:19:in `start'
    16: from /opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.4/lib/rails/commands/console/console_command.rb:70:in `start'
    15: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:400:in `start'
    14: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:471:in `run'
    13: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:471:in `catch'
    12: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:472:in `block in run'
    11: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:537:in `eval_input'
    10: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb/ruby-lex.rb:150:in `each_top_level_statement'
     9: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb/ruby-lex.rb:150:in `catch'
     8: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb/ruby-lex.rb:151:in `block in each_top_level_statement'
     7: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb/ruby-lex.rb:151:in `loop'
     6: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb/ruby-lex.rb:166:in `block (2 levels) in each_top_level_statement'
     5: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:538:in `block in eval_input'
     4: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:704:in `signal_status'
     3: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:559:in `block (2 levels) in eval_input'
     2: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:608:in `handle_exception'
     1: from /opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:608:in `print'
/opt/gitlab/embedded/lib/ruby/2.7.0/irb.rb:608:in `write': "\\xC7" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 9月22日
    • 创建了问题 9月14日

    悬赏问题

    • ¥20 测距传感器数据手册i2c
    • ¥15 RPA正常跑,cmd输入cookies跑不出来
    • ¥15 求帮我调试一下freefem代码
    • ¥15 matlab代码解决,怎么运行
    • ¥15 R语言Rstudio突然无法启动
    • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
    • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
    • ¥15 用windows做服务的同志有吗
    • ¥60 求一个简单的网页(标签-安全|关键词-上传)
    • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法