I'm trying to use the following script:
import telnetlib
server = telnetlib.Telnet('mail.optonline.net', '25')
server.write('EXIT\n')
print server.read_all()
However, it doesn't show anything (even if I remove the server.write). By the way, this is the way to exit the telnet server, by using EXIT (then enter).
SMTPLIB module from falsetru works perfectly. Thanks, falsetru!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.