How to add a monthly automatic email to the PHP server?
Younger brother has not been to PHP before, recently suddenly encountered this problem, describe the bad words please forgive me.
The server is using lamp,
1. To add an automatic reminder for this server, each employee's bill is grabbed from the database at the end of each month, and then sent to each employee.
2. This server now if the administrator wants to increase the permissions of an employee to access the server farm, only one employee can be added one permission at a time, and now want to implement a function, create a management interface to let the administrator at once can add multiple permissions to multiple users at once, a bit similar to submitting a table.
The first thing I think about is the use of Linux crontab, and the second is some kind of form ... But the following do not know how to do it. Want to ask about the implementation of these features what is the idea? Thank you, great God.
------Solution--------------------
First build a PHP file, similar to the.
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 the employee? Or an online bill?
An employee accesses a server farm? What kind of group are you?
I think it's just a form. In conjunction with the database
------solution--------------------
Execute PHP with the command line, such as
PHP test.php
Even when you write the top to the shell.
The second, with two forms (two over pages), the first form (the first page), and after the user is selected, userid[is uploaded to the second page. To the second page,