Can you format this code and make sure the break; is in the correct place? I'm just guessing you want a single email but can't tell if that's what you meant. @cherryn Should we also be closing the iterator from viewEmails or will those be auto-closed?