Libre Office出错 - SSL和Gmail

时间:2016-01-22 14:41:09

标签: email ssl mailmerge libreoffice-writer

网络连接正常,但是不在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)]

2 个答案:

答案 0 :(得分:0)

自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.现在,将合并文档作为邮件发送应该可以正常工作。

答案 1 :(得分:0)

在LibreOffice 6.0.2.1中

  1. 勾选SSL但使用端口587 would normally be for tls
  2. 允许访问gmail安全设置中安全性较低的应用
  3. 为我的帐户工作,虽然我想知道允许&#34;不太安全的应用程序是多么安全&#34;