2 Email message and email sending related helper functions.
8 # Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of
9 # seconds, which slows down the restart of the server.
10 class CachedDnsName(object):
12 return self
.get_fqdn()
15 if not hasattr(self
, '_fqdn'):
16 self
._fqdn
= socket
.getfqdn()
19 DNS_NAME
= CachedDnsName()