| |

VerySource

 Forgot password?
 Register
Search
View: 976|Reply: 4

Question about sending query data by email. !!!

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-9 18:20:01
| Show all posts |Read mode
The function I want to achieve is to execute the query statement regularly every day and send the query result to the user by email. Different users can set their own query conditions.

Some guys who have done similar things give some ideas !!!!!!

The biggest problem is how to query the data sent by email.
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-9-2 09:00:01
| Show all posts
Save different users and their query conditions in the database. Make a console program, take query conditions, execute, get results, and send emails. The timing function can be run regularly with the Windows system tool Scheduled Tasks (it seems to be called scheduled tasks).
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-9-2 09:15:01
| Show all posts
Schedule tasks to execute this console program regularly
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-2 10:45:01
| Show all posts
The biggest problem is how to send out the queried data via email.


You can create a dynamic page like this. After you take out the records from SQL (of course, don't take them all at once, take a part at a time), loop the record set, construct the URL according to the value of each record, and use a com component called winhttp , Visit the dynamic page just created, you can get the content of each record, and then you can use jmail or the system's own Mail to send it to the user's mailbox.

Until all records have been sent.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-2 13:15:01
| Show all posts
up
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list