Custom action email is not working

Custom action email is not working

Hi all,

I want to create a custom action in our team management report where we can send an automated email to selected team records (checkboxes). The addresses in the email value fields are correct but I keep getting this " no valid mail id found in to address Line:(0)" error.

I am using the following code for my custom action (where toaddress refers to the correct eMail field):

  1. void sendnotification(string toaddress)
  2. {
  3. sendmail
  4. [
  5. from :zoho.adminuserid
  6. to :toaddress
  7. subject :"Test Mail"
  8. message :"Lorem Ipsum"
  9. ]
  10. }

Does anyone know what I am doing wrong here?

Thank you!