我有这样的代码:
for each in foo:
if each not in foo2:
msg = ("""
Some message:
%s
"""
% (each))
server.sendmail(from, to, msg)
它工作得很好而且花花公子。但是,当我尝试这样做时:
for each in foo:
if each not in foo2:
msg = "Some message:\n"+each
server.sendmail(from, to, msg)
它发送空白电子邮件。可能还值得注意的是,each
它始终是一个 URL。它与 SMTPlib 如何解析电子邮件有关吗?