public ReceivedEmail[] receiveEmailAndDelete(final EmailFilter filter) {
    """
	Receives all emails that matches given {@link EmailFilter} and
	mark all messages as 'seen' and 'deleted'.
	
	@param filter {@link EmailFilter}
	@return array of {@link ReceivedEmail}s.
    """
		final Flags flags = new Flags();
		flags.add(Flags.Flag.SEEN);
		flags.add(Flags.Flag.DELETED);
		return receiveMessages(filter, flags, null, false, null);
	}
public ReceivedEmail[] receiveEmailAndDelete(final EmailFilter filter) {
		final Flags flags = new Flags();
		flags.add(Flags.Flag.SEEN);
		flags.add(Flags.Flag.DELETED);
		return receiveMessages(filter, flags, null, false, null);
	}
public ReceivedEmail [ ] receiveEmailAndDelete ( final EmailFilter filter ) { final Flags flags = new Flags ( ) ; flags . add ( Flags . Flag . SEEN ) ; flags . add ( Flags . Flag . DELETED ) ; return receiveMessages ( filter , flags , null , false , null ) ; }
Receives all emails that matches given {@link EmailFilter} and
mark all messages as 'seen' and 'deleted'.

@param filter {@link EmailFilter}
@return array of {@link ReceivedEmail}s.
Receives all emails that matches given { @link EmailFilter } and mark all messages as seen and deleted .