@staticmethod
def _generate_email(email, name=None):
    """Helper to convert values into email dictionary.

            :param email: a string with email address
            :param name: (optional) a string with recipient's name
            :return dictionary object
        """
    result = {'email': email}
    if name:
        result['name'] = name
    return result
