Send email after login

Hello everyone.
I trying to edit the original login plugin to send an email after someone login so I edit the userLoginAuthenticate() function, but i dont know how to use the mail plugin to send an email there.
Someone can help me please.

@mcambronero, The docs of the email plugin might give you the answers you need.

It shows how to configure the plugin, to test it and how to send emails programmatically.

Hello, yes the plugin has a section but when I copy that code and chance with the values that I need, send me an error:

I dont know if the way I doing is the right way.

@mcambronero, Without knowing your code and input parameters, it’s hard to tell whether the config of email plugin is broken, or whether the address you’re sending to/from are invalid.

To test the config of email plugin you can try:

$ bin/plugin email test-email -t

@mcambronero, To help future community members stumbling over the same issue, would you mind sharing in what way above command led you to the solution of your issue?