'Sets the value of the string
:param value:
A unicode string'

def set(self, value):

    if (not isinstance(value, str_cls)):
        raise TypeError(unwrap(u'\n                                                                %s    value    must    be    a    unicode    string,    not    %s\n                                                                ', type_name(self), type_name(value)))
    if (value.find(u'@') != (-1)):
        (mailbox, hostname) = value.rsplit(u'@', 1)
        encoded_value = ((mailbox.encode(u'ascii') + '@') + hostname.encode(u'idna'))
    else:
        encoded_value = value.encode(u'ascii')
    self._normalized = True
    self._unicode = value
    self.contents = encoded_value
    self._header = None
    if (self._trailer != ''):
        self._trailer = ''
