Russian  English  All projects

Php script: read emails via smtp and save to mysql



You need a script that, when launched, receives new messages from the mailbox on the yandex.ru (authorization by login and password, this function is enabled on the mailbox) and saves them to the mysql database (date / time, sender, recipient, copies to whom, service headers, subject of the message, text). Attached files are saved to the hosting and in the database writes links to these files (name, link to the file). When linking, you can assign unique names, the main thing is that the original original name is preserved in the "file name" field.

php 7.2 mysql 5.6 (utf-8)

It is advisable to write as simply as possible. For variables and functions used, add comments in Russian language code. Database access and authorization token are assigned to variables at the top of the code.
07.11.2022 19:26



 Answers freelancers