How can I add a monthly automatic mail function to the php server? The younger brother has never done php before. recently, he suddenly encountered this problem. if the description is not good, please forgive me. the server uses LAMP, & nbsp; 1. to add an automatic reminder function for this server, you can get the bills of each employee from the database at the end of each month and then send them to each employee. 2. if the administrator wants to add a member, how can he add a monthly automatic mail function to the php server?
The younger brother has never done php before. recently, he suddenly encountered this problem. if the description is not good, please forgive me.
The server uses LAMP,
1. to add an automatic reminder function for this server, you can get the bills of each employee from the database at the end of each month and send them to each employee.
2. if the administrator wants to add an employee's permissions to access the server group, the administrator can only add one permission to one employee at a time. now, the administrator wants to implement one function, create a management interface so that the administrator can add multiple permissions to multiple users at a time, which is similar to submitting a table.
First, I want to use linux crontab, and the second is a form... but I don't know how to do it. what is the general idea of implementing these functions? Thank you.
------ Solution --------------------
First, create a php file, similar.
PHP code
Include_once ('class. phpmailer. php '); $ mail = new PHPMailer (); $ mail-> MsgHTML ("hello world"); $ mail-> AddAddress ("email 1 ", "Name 1"); $ mail-> AddAddress ("email 2", "Name 2"); $ mail-> AddAttachment ("yourlogo.gif ");
------ Solution --------------------
How are you going to send it to employees? Email? Or online bill?
An employee accesses the server group? What kind of group are you in?
I think we should use forms... in combination with databases.
------ Solution --------------------
Execute PHP using the command line, as shown in figure
Php test. php
You can even write the above to shell.
Second, use two forms (two excessive webpages), the first form (the first page), select the user, and upload the userid [] to the second page. On the second page,Other forms are permission data.