You should use the list in box in .
eg.
[ " liz6beigle@hotmail.com ", " another.one@email.com " ]
Gmail has a limit of bounce rates and recipients that you can send at the same time.
You cannot store multiple letters under one line. Placing one email address on each line will give better readability and prevent parsing errors.
Here is sample code in Java from Google. Hope this helps others understand:
public static MimeMessage createEmail(String to, String from, String subject, String bodyText) throws MessagingException { Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); MimeMessage email = new MimeMessage(session); InternetAddress tAddress = new InternetAddress(to); InternetAddress fAddress = new InternetAddress(from); email.setFrom(new InternetAddress(from)); email.addRecipient(javax.mail.Message.RecipientType.TO, new InternetAddress(to)); email.setSubject(subject); email.setText(bodyText); return email; }
Gmail API: sending messages
Check out the first code example.
source share