How to get data and .dll

sorry for my bad english.

how use “send email” action with number of current waiting call in body ?

i.e. : “Attention, 30 calls are currently in waiting !”

Is somebody know how to use .dll library to create a program that use number of calls, waiting time, … ?

Thanks for your help !!!