python smtp email error "[Errno -2] Name or service not known" solution

Recently gave ss-py-mu wrote checks whether a user expires, and to remind the first two days before the expiration of the mail function.
Configuration is stored in the ini file by configparser acquisition module, but found that attempts to send mail when given [Errno -2] Name or service not known.

Internet search of the investigation, said the firewall to open ports 25 and 53, but I'm a native debugger is not enabled firewall. And the machines DNS 53 in general is not disabled, 25 I do not quite understand, and access to the mail server machine 25 Does this have to do with 25?
But qq enterprise Post 465 port is used, it should be useless to 25 bar.

Finally I found my debug recipients and senders are more than a quotation mark, similar to '\'aaa@sitemcom\''this. Well, ini is not written in quotation marks, as a string with get automatically fill quotes, ignored this point.

Remove the extra quotation marks to normal.

Guess you like

Origin www.cnblogs.com/dylanchu/p/11141207.html