Is there a way to sent an email with some variables while testing?

Hi all, first post on this forum after reading a lot!!

Is there a way to sent an email with some variables while testing instead of the report email after testing?
While the test is running i want to sent an email (or text message) with some variables.

Anyone can help?

Thank in advance.

Hello,

you can write a method for sending mails and you can call it whenever you want during execution. See my solution:

Thank you so much