function getFromAddress(requestedFromAddress, requestedReplyToAddress) {
    if (!requestedFromAddress) {
        // Use the default config
        requestedFromAddress = emailAddress.service.defaultFromEmail;
    }

    // Clean up email addresses (checks whether sending is allowed + email address is valid)
    const addresses = emailAddress.service.getAddressFromString(requestedFromAddress, requestedReplyToAddress);

    // fill in missing name if not set
    const defaultSiteTitle = settingsCache.get('title') ? settingsCache.get('title') : tpl(messages.title, {domain: getDomain()});
    if (!addresses.from.name) {
        addresses.from.name = defaultSiteTitle;
    }

    return {
        from: EmailAddressParser.stringify(addresses.from),
        replyTo: addresses.replyTo ? EmailAddressParser.stringify(addresses.replyTo) : null
    };
}
@param {string} requestedFromAddress
@param {string} requestedReplyToAddress
@returns {{from: string, replyTo?: string|null}}