For smtp and pop3 usage in php, I want to use php to implement the post office function. I downloaded hmailserver and a webmail and configured it successfully.
When looking at the source code of webmail, we found two important classes, one being class. smtp. php, one is class. pop3.php, because it is not very familiar with the structure of the site (no documentation, although the structure looks very clear, but there are a lot of data cached in it, so I felt dizzy and couldn't see it anymore)
I searched on the internet and found that these two classes exist in many places. it seems that phpmailer is highly respected. However, I think phpmailer seems to have only smtp but not pop3.
So I would like to ask, what are the ready-made open-source resources for smtp and pop3 implementation?
In this way, I can call smtp and pop3 resources and complete subsequent data processing.
Thank you.
Reply to discussion (solution)
Https://github.com/PHPMailer/PHPMailer
With POP3
Https://github.com/PHPMailer/PHPMailer
With POP3
I compared my webmail with my webmail and looked at the pop3 class to understand it as follows:
1. phpmailer's pop3 only provides pop3 connection, verification, sending and retrieval of data, and closes the connection. However, it does not include any pop3 commands, therefore, you must use sendString to send a definite command and getResponse to obtain the data returned by the pop server,
2. you also need to decode the returned eml information.
I don't know. Is that true?
If yes, is there any decoding eml (mime ?) ?
Thank you.
In addition, the pop3 address of github is 5.0, and the other XXXXforceXXXX () is 5.1 ......