Email output not being sent to multiple Gmail IDs

I have Logstash email output that is configured as:

email  {
        port           =>    "587"
        address        =>    "smtp.gmail.com"
        username       =>    "a@gmail.com"
        password       =>    "password"
        authentication =>    "plain"
        use_tls        =>    true    
        from           =>    "a@gmail.com"
        subject        =>    "Alert"
        to             =>    "x@gmail.com, y@gmail.com, z@gmail.com"
        via            =>    "smtp"  
        body           =>    "Error!"
}       

However, the email only gets sent to the first email id, x@gmail.com. How do I get it to send to all the email addresses?