How to implement the automatic email sending function to achieve this function: there is a deadline time limit, if the time limit of the day is different from the deadline time limit of 30 days, the email is automatically sent to a fixed email account. I think it may not be too difficult. In fact, I know the time detection and email sending functions as well as the implementation. The key difficulty lies in how the main software with this function can automatically send emails.
To implement this function, you can set a time limit for deadline. if the time limit for the current day is 30 days different from that for the deadline, an email is automatically sent to a fixed email account.
I think it may not be too difficult. In fact, I know the time detection and email sending functions as well as the implementation. The key difficulty lies in that the main software with this function is rarely opened, or opened only when needed. This may cause the software not to be turned on 30 days different from deadline, and thus the automatic email sending function cannot be implemented.
How can this problem be solved?
I am very grateful to you for providing templates or case code. Email automatically sends share:
------ Solution --------------------
You need batch processing. In linux, shell is used.
------ Solution --------------------
You can directly use crontab-e to edit the task. The task is related to the currently logged-on user. after editing, save the task and it takes effect.
------ Solution --------------------
You can only send messages at a specified time on a specified day. for example, you can only send messages at a specified time on a specified day.
------ Solution --------------------
Http://blog.csdn.net/fangchongbory/article/details/7586275
------ Solution --------------------
Reference:
Quote: reference:
Direct cron + phpcli
Just try. Can the moderator clarify cron + phpcli?
Some people say that cron creates a task and calls a php file and runs it at a fixed time every day. In this file, I set Database Connection, check conditions, and selective email sending.
Is the above idea acceptable? What is Phpcli? Can you provide more guidance?
Almost all of them are just operations on the command line, not the curl method above...