2016-01-22 106 views
0

网络连接正在工作,但不在Libre Office - 4.4.7.2版本下的传出服务器。任何帮助?自由办公室错误 - SSL和gmail

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)] 

回答

0

自2013年起,LibreOffice的作家有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.现在,发送合并文档作为邮件应该可以工作。

+0

:'module'object has no attribute'SMTP_SSL',traceback following following:C:\ Program Files(x86)\ Libre Office 4 \ program \ mailmerge.py:100在函数connect()[self.server = smtplib.SMTP_SSL(server,port,timeout = tout)] –

+0

嗯 - 这是一个普通的香草LibreOffice安装?你有没有尝试http://stackoverflow.com/questions/30545442/sorry-unexpected-error-module-object-has-no-attribute-smtp-ssl?我使用我所描述的修改“修复了”不同的LO安装,并且我从未遇到过这个错误...... – tohuwawohu

+0

您是否对我的建议书应用了更多修改,请与https://docs.libreoffice.org/scripting/html/mailmerge_8py_source.html – tohuwawohu

0

在LibreOffice中6.0.2.1

  1. 蜱SSL但使用端口587 would normally be for tls
  2. 允许在Gmail的安全设置

就职于我的账户不太安全的应用程序访问,虽然我不知道安全,它允许“不太安全的应用程序”