Python by smtplib, imaplib sending and receiving files (unfinished).

Recently wrote a small script, I wanted to communicate with the server, of course, not be the type of communication to communicate, or ip port methods through ssh, which is more difficult for me, and the phone also has difficulty communicating with the server.

I think the program is carried out through the mail-server communication, the server reads every minute of my mailbox, I just send a specific command, when the server to resolve the specific instructions on the implementation of the specific script.

Is the need to frequently go get my mail, do not know will not be shielded 163, but do not Guannameduo to compare, this mailbox module recorded.

 

Because some of the early transport protocols, such as SMTP mail transfer protocol, can only transfer printable ASCII characters. 8Bit led to the original bytecode (range 0-255) exceeds the available range. For example, when a picture message transfer resources when one Byte value is 10111011B, corresponding to the decimal ASCII code 187 does not belong to the scope and therefore can not be transferred. This time, Base64 encoding application and birth, which uses 6bit character of the original expression of 8bit characters. Base64 can control characters even beyond the original ASCII code of the ASCII characters are converted into 6big printable characters.
It can also be used in:

    • Spam communicators use Base64 to avoid anti -spam tools, because the tools do not usually translate the message of Base64.
    • In LDIF file, Base64 encoded string as

 

The above explains why the mailbox file transfer and then use Base64 encoding.

 

Guess you like

Origin www.cnblogs.com/sidianok/p/12669492.html