【问题标题】:Error with Libre Office - SSL and gmailLibre Office 出错 - SSL 和 gmail
【发布时间】:2016-01-22 14:41:09
【问题描述】:

网络连接正常但传出服务器不在 Libre Office - 4.4.7.2 版本下。有什么帮助吗?

LibreOffice could not connect to the outgoing mail server. Check your system's settings and the settings in LibreOffice. Check the server name, the port and the secure connections settings
--
<class 'smtplib.SMTPServerDisconnected'>: Connection unexpectedly closed, traceback follows
  C:\Program Files (x86)\LibreOffice 4\program\python-core-3.3.3\lib\smtplib.py:375 in function getreply() [raise SMTPServerDisconnected("Connection unexpectedly closed")]
  C:\Program Files (x86)\LibreOffice 4\program\python-core-3.3.3\lib\smtplib.py:322 in function connect() [(code, msg) = self.getreply()]
  C:\Program Files (x86)\LibreOffice 4\program\python-core-3.3.3\lib\smtplib.py:241 in function __init__() [(code, msg) = self.connect(host, port)]
  C:\Program Files (x86)\LibreOffice 4\program\mailmerge.py:100 in function connect() [self.server = smtplib.SMTP(server, port,timeout=tout)]

【问题讨论】:

    标签: email ssl mailmerge libreoffice-writer


    【解决方案1】:

    在 LibreOffice 6.0.2.1 中

    1. 勾选 SSL 但使用端口 587 would normally be for tls
    2. 在您的 gmail 安全设置中允许访问不太安全的应用

    为我的帐户工作,但我想知道允许“不太安全的应用”有多安全

    【讨论】:

      【解决方案2】:

      自 2013 年以来,LibreOffice Writer 有一个关于邮件合并向导的known bug:使用 SSL 连接将合并的邮件发送到 SMTP 服务器将失败。

      有一种解决方法(感谢Andrea Tessadri)——必须编辑负责发送邮件的 python 脚本。它叫做mailmerge.py,你会在/usr/lib/libreoffice/program/ 下找到它(在linux 机器上),在windox 机器上,它位于C:\Program Files (x86)\LibreOffice 4\program(参见错误消息的最后一行)。

      要使用 SSL 发送邮件,请确保没有 LO 进程正在运行(查看快速入门!)。现在,打开/usr/lib/libreoffice/program/mailmerge.py(在Linux上:具有root权限),搜索该行

      self.server = smtplib.SMTP(server, port,timeout=tout)
      

      替换为

      self.server = smtplib.SMTP_SSL(server, port,timeout=tout)
      

      现在,当通过邮件发送合并文档时,不要在邮件设置中启用 SSL;只需将端口设置为 465。现在,将合并的文档作为邮件发送即可。

      【讨论】:

      • : 'module' 对象没有属性 'SMTP_SSL',traceback 遵循函数 connect 中的 C:\Program Files (x86)\LibreOffice 4\program\mailmerge.py:100 () [self.server = smtplib.SMTP_SSL(server, port,timeout=tout)]
      • 嗯 - 这是一个普通的 LibreOffice 安装吗?你试过stackoverflow.com/questions/30545442/… 吗?我已经使用我描述的修改“修复”了不同的 LO 安装,但我从未遇到过该错误......
      • 您对邮件合并脚本的修改是否比我建议的要多?请与docs.libreoffice.org/scripting/html/mailmerge_8py_source.html比较
      • 我尝试使用 SMTP_SSL - 不工作,我改回 SMTP,然后使用菜单中的全部更新,我得到了
      • 我不确定“全部更新” - 属于哪个菜单?
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-02-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-15
      • 1970-01-01
      • 2021-05-31
      相关资源
      最近更新 更多