organizerAddress = inv.getOrganizer().getFriendlyAddress();
if (inv.hasOrganizer()) organizerAddress = inv.getOrganizer().getFriendlyAddress(); else organizerAddress = null;
    public static MimeMessage createDefaultReply(Account fromAccount,                                                 Appointment appt,                                                 Invite inv,                                                 MimeMessage mmInv,                                                 String replySubject,                                                 Verb verb,                                                 String additionalMsgBody,                                                 ZVCalendar iCal)    throws ServiceException {        try {            Locale lc;            Address organizerAddress;            Account organizer = inv.getOrganizerAccount();            if (organizer != null) {                lc = organizer.getLocale();                organizerAddress =                    AccountUtil.getFriendlyEmailAddress(organizer);            } else {                lc = fromAccount.getLocale();                organizerAddress = inv.getOrganizer().getFriendlyAddress();            }            String fromDisplayName =                fromAccount.getAttr(Provisioning.A_displayName,                                    fromAccount.getName());            StringBuilder replyText = new StringBuilder();            MsgKey statusMsgKey;            boolean isResourceAccount = fromAccount instanceof CalendarResource;            if (VERB_ACCEPT.equals(verb)) {                if (isResourceAccount)                    statusMsgKey = MsgKey.calendarResourceDefaultReplyAccept;                else                    statusMsgKey = MsgKey.calendarDefaultReplyAccept;            } else if (VERB_DECLINE.equals(verb)) {                if (isResourceAccount)                    statusMsgKey = MsgKey.calendarResourceDefaultReplyDecline;                else                    statusMsgKey = MsgKey.calendarDefaultReplyDecline;            } else if (VERB_TENTATIVE.equals(verb)) {                if (isResourceAccount)                    statusMsgKey = MsgKey.calendarResourceDefaultReplyTentativelyAccept;                else                    statusMsgKey = MsgKey.calendarDefaultReplyTentativelyAccept;            } else                statusMsgKey = MsgKey.calendarDefaultReplyOther;            String statusMsg;            if (!statusMsgKey.equals(MsgKey.calendarDefaultReplyOther))                statusMsg = L10nUtil.getMessage(statusMsgKey,                                                lc,                                                fromDisplayName);            else                statusMsg = L10nUtil.getMessage(statusMsgKey,                                                lc,                                                fromDisplayName,                                                verb.toString());            replyText.append(statusMsg).append("\r\n\r\n");            if (additionalMsgBody != null) {                replyText.append(additionalMsgBody).append("\r\n");            }            if (mmInv != null)                attachInviteSummary(replyText, mmInv, lc);            List<Address> toList = new ArrayList<Address>(1);            toList.add(organizerAddress);            return createDefaultCalendarMessage(                    AccountUtil.getFriendlyEmailAddress(fromAccount),                    toList, replySubject,                    replyText.toString(), inv.getUid(), iCal);        } catch (UnsupportedEncodingException e) {            throw MailServiceException.ADDRESS_PARSE_ERROR(e);        }    }