how to make a php script that read an email from the server?

前端 未结 2 439
忘掉有多难
忘掉有多难 2021-01-13 05:42

is there any way that when i user send an email to admin@xx.com the php script reads the email\'s information and replay to the user automatically ?

EDIT :: is there

2条回答
  •  青春惊慌失措
    2021-01-13 05:50

    Take a look at php's imap extension module. It can access both pop3 and imap accounts.

    If and how you can start a script when an email is delivered to an inbox depends on your local mailing system. E.g. with qmail you can use a command line in .qmail. You might want to ask on ServerFault how this exactly works and how it is configured (and where; afaik .qmail is not the only place where you can add a command line).

提交回复
热议问题