I am using this method to send email to two Gmail ids, but this is giving an error that:

> 
> The method addRecipient(Message.RecipientType, Address) in the type Message is not applicable for the arguments (Message.RecipientType, Address[])
> 
> 
> 

How can I send email to multiple ids?

```
 Address toaddress[] = new InternetAddress[2];
 toaddress[0] = new InternetAddress(mail_to_0);
 toaddress[1] = new InternetAddress(mail_to_1);
 message.addRecipient(Message.RecipientType.TO,toaddress);

```