以为我会在Ubuntu上尝试使用Mutt,在尝试让它工作几天后,我现在仍然坚持这个错误。
Could not connect to smtp.gmail.com (Interrupted system call).
我已经在互联网上寻找了解如何修复它,但我无法找到任何可以修复它的东西。已创建~/.mutt
和~/.mutt/cache/
个文件夹。我不认为msmtp存在问题,因为它没有向日志文件添加任何内容。
此处我的.muttrc
当然没有我的密码:
set imap_user = "<my_email>@gmail.com"
set imap_pass = "<my_password>"
set smtp_url = "smtp://<my_email>@smtp.gmail.com:587/"
set smtp_pass = "<my_password>"
set from = "<my_email>@gmail.com"
set realname = "<my_name>"
set sendmail="/usr/bin/msmtp"
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed = "+[Gmail]/Drafts"
set trash = "imaps://imap.gmail.com[Gmail]/Trash"
#======================================================#
# Order of headers and what to show
hdr_order Date: From: User-Agent: X-Mailer \
To: Cc: Reply-To: Subject:
ignore *
unignore Date: From: User-Agent: X-Mailer \
To: Cc: Reply-To: Subject:
#======================================================#
# which editor do you want to use?
# vim of course!
set editor="vim -c 'set tw=70 et' '+/^$' "
set edit_headers # See the headers when editing
和我的.msmtprc
account default
host smtp.gmail.com
port 587
from "<my_email>@gmail.com"
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user "<my_email>@gmail.com"
password "<my_password>"
logfile ~/.msmtp.log
现在这里有一些非常奇怪的东西...... mutt能够获得新的电子邮件以及当我推迟发送电子邮件时它会将其保存为gmail中的草稿并将其上传到gmail服务器。感谢。
答案 0 :(得分:8)
经过多天的搜索,我找到了解决方案。我需要将smtp网址更改为:
set smtp_url="smtps://<username>@smtp.gmail.com:465/"
电子邮件发送就好了!