2016-01-22 35 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的安全設置

就職於我的賬戶不太安全的應用程序訪問,雖然我不知道安全,它允許「不太安全的應用程序」