The specific requirements are this:
Now there are some messages that need to be sent by clicking the button
Using mailto, click the button to pop up the default mail window
Also, update the database to mark the recipient of the message as sent
And then show all the unsent recipients.
What should I do with js,php? A little more details, please.
Reply content:
The specific requirements are this:
Now there are some messages that need to be sent by clicking the button
Using mailto, click the button to pop up the default mail window
Also, update the database to mark the recipient of the message as sent
And then show all the unsent recipients.
What should I do with js,php? A little more details, please.
JS to do the queue. The execution of a single task. PHP provides restful API support.
This logic should be wrong, the use of mailto to send mail, should not be able to get the message sent successfully?
Feel that you should PHP
SMTP
send mail using servers on the server side.
The user will fill in the recipient, and send the content successfully, then click Send
JS
Get the data and pass Ajax
the data to the PHP server
The PHP service uses the server to send the message to the SMTP
specified user, marks the success in the database, and then JS
returns the address of the unsent recipient.
Ajax
After the callback succeeds, the address of the received unsent recipient is displayed with an JS
operational DOM
structure.