How can I add a monthly automatic mail function to the php server?

Source: Internet
Author: User
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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.