简体   繁体   中英

Connecting to POP3 via PHP to check for e-mail upload

How would I connect to POP3 via e-mail so that I can check if a file has been sent to an e-mail address so I can rename that file with the e-mail address it was sent from? I can do the end part by using SMTP & Mailer to send it back but because the actual project I'm working on moves away from e-mail client half way through I have no way to check which user sent it unless I rename the file with the e-mail it is sent from

Thanks in advance for the help!

You would need the php_imap module installed on the server, then use the functions it exposes to connect to the mailbox and check for email

The PHP.net documentation for the module has some good examples, both official and in the comments

http://php.net/manual/en/book.imap.php

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM