﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
13570	SMTP backend should try harder to figure out the local host name	Jacob	sernin	"Django's SMTP backend sets the `local_hostname` argument to `smtplib.SMTP` by calling `socket.getfqdn()` (via `django.core.mail.utils.DNS_NAME`, which caches that result). `smtplib` itself uses a slightly more robust method (see `smtplib` around line 245) if `local_hostname` isn't given.

In certain circumstances this can mean that sending mail through `smtplib` directly works, but sending it via `django.core.mail` fails.

We could solve this by just passing `local_hostname=None`, but that'd result in a DNS lookup every time we send email, which is silly (and which is why we're caching it in the first place).

So, `DNS_NAME` should use similar logic to `smtplib` to try harder to get the DNS hostname."	Bug	closed	Core (Mail)	1.2	Normal	duplicate			Accepted	1	0	1	1	0	0
