... or a file during development and an SMTP server or email service provider in production. コードは django.core.mail モジュールにあります。 簡単な例 簡単なメール送信 ... MAILERS setting isn't defined). Use the MAILERS setting to tell Django how to send email. For example, to send through an SMTP server running on the local machine: MAILERS = { "default" : { "BACKEND" : "django.core.mail.backends.smtp.EmailBackend" , ... email backend" class. メールのバックエンド lists the email backends that come with Django. The example above uses Django's SMTP email backend , which sends using the standard SMTP protocol. This backend is useful for many production configurations, i ... ... eprecated EMAIL_* settings ... , }, }, } For example, to update these settings: EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" EMAIL_HOST = "mail.example.net" EMAIL_USE_TLS = True EMAIL_PORT = 587 EMAIL_HOST_USER = "user@example.net" E ... MAIL_HOST_PASSWORD = "password" use: MAILERS = { "default" : { "BACKEND" : "django.core.mail.backends.smtp.EmailBackend" , "OPTIONS" : { "host" : "mail.example.net" , "use_tls" : True , # port is not needed: it defaults to 587 wi ... ACKEND becomes "BACKEND" . If your settings didn't define EMAIL_BACKEND , the default value was "django.core.mail.backends.smtp.EmailBackend" (which is also the default if a MAILERS configuration doesn't specify the "BACKEND" ). EMAIL_FILE_PATH becom ... ... いる場合にのみ使用されます(詳細は、 ミドルウェア (Middleware) を参照)。 EMAIL_BACKEND Default: ' django.core.mail.backends.smtp.EmailBackend ' 使用するメール送信のバックエンド。利用可能なバックエンドのリストについては、 メールのバックエンド を参照して ... precated and will be removed in Django 2028. Its replacement is "host" under OPTIONS in a MAILERS definition that uses the SMTP email backend. See Migrating email to mailers . EMAIL_HOST_PASSWORD デフォルト値: '' (空文字列) EMAIL_HOST 内で定義された ... ated and will be removed in Django 2028. Its replacement is "password" under OPTIONS in a MAILERS definition that uses the SMTP email backend. See Migrating email to mailers . EMAIL_HOST_USER デフォルト値: '' (空文字列) EMAIL_HOST 内で定義された SMTP ... ... , + , . and - characters. E メールのバックエンド You can now configure the way that Django sends email . Instead of using SMTP to send all email, you can now choose a configurable email backend to send messages. If your hosting provider uses a sandb ... ox or some other non-SMTP technique for sending mail, you can now construct an email backend that will allow Django's standard mail sending methods ... tes have been removed in current Django docs. Please refer to the docs for Django 1.3 or older to find these instructions. SMTPConnection The SMTPConnection class has been deprecated in favor of a generic email backend API. Old code that explicitly i ... ... elf isn't vulnerable because HttpResponse and the mail sending utilities in django.core.mail prohibit newlines in HTTP and SMTP headers, respectively. While the validators have been fixed in Django, if you're creating HTTP responses or email messages ... ... elf isn't vulnerable because HttpResponse and the mail sending utilities in django.core.mail prohibit newlines in HTTP and SMTP headers, respectively. While the validators have been fixed in Django, if you're creating HTTP responses or email messages ... ... low" according to the Django security policy . CVE-2026-7666: Potential unencrypted email transmission via STARTTLS in the SMTP backend When using EMAIL_USE_TLS , a failed STARTTLS handshake could leave a partially-initialized connection that would s ... ... echanisms for CACHES , DATABASES , STORAGES , and TASKS : MAILERS = { "default" : { "BACKEND" : "django.core.mail.backends.smtp.EmailBackend" , "OPTIONS" : { "host" : "smtp.example.com" , "use_tls" : True }, }, "marketing" : { "BACKEND" : "example.th ... assword" OPTIONS in MAILERS . See Replacing auth_user and auth_password . Directly constructing and using instances of the smtp.EmailBackend class is deprecated. Use mail.mailers to obtain email backend instances. The BaseEmailBackend.__init__() cons ... ... low" according to the Django security policy . CVE-2026-7666: Potential unencrypted email transmission via STARTTLS in the SMTP backend When using EMAIL_USE_TLS , a failed STARTTLS handshake could leave a partially-initialized connection that would s ... ... isting NULL rows ( #23609 ). Fixed generic relations in ModelAdmin.list_filter ( #23616 ). Restored RFC compliance for the SMTP backend on Python 3 ( #23063 ). Fixed a crash while parsing cookies containing invalid content ( #23638 ). The system chec ... 2026年10月08日