On this page
smtplib.SMTPDataError
Prev: smtplib.SMTPConnectError | Up: smtplib | Next: smtplib.SMTPException
Rel: smtplib.quoteaddr, smtplib.quotedata, smtplib.SMTP, smtplib.SMTP_SSL
Ref: docs.python.org — smtplib.SMTPDataError
Tags: #public #python3 #stdlib #smtplib
Import
import smtplib
from smtplib import SMTPDataError
Signature & Overview
smtplib.SMTPDataError(code, msg)
The SMTP server didn't accept the data.
Methods & Attributes
SMTPDataError.add_note(self, note, /)— Add a note to the exceptionSMTPDataError.with_traceback(self, tb, /)— Set self.traceback to tb and return self.
Usage
import smtplib
assert issubclass(smtplib.SMTPDataError, smtplib.SMTPResponseException)
Gotchas
- Server refused the message body (
DATAphase)—often due to size limits or spam filters.
REPL Inspect
from smtplib import SMTPDataError
help(SMTPDataError)
Linked from
Related notes
- tuts/python3/stdlib_module/smtplib/SMTPConnectError Linked here; links to this page; shared tags: #smtplib, #stdlib
- tuts/python3/stdlib_module/smtplib/SMTPException Linked here; links to this page; shared tags: #smtplib, #stdlib
- tuts/python3/stdlib_module/smtplib Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/smtplib/quoteaddr Linked here; shared tags: #smtplib, #stdlib
- tuts/python3/stdlib_module/smtplib/quotedata Linked here; shared tags: #smtplib, #stdlib
- tuts/python3/stdlib_module/smtplib/SMTP Linked here; shared tags: #smtplib, #stdlib
- tuts/python3/stdlib_module/smtplib/SMTP_SSL Linked here; shared tags: #smtplib, #stdlib
- tuts/python3/stdlib_module/smtplib/SMTPAuthenticationError shared tags: #smtplib, #stdlib
- tuts/python3/stdlib_module/smtplib/SMTPHeloError shared tags: #smtplib, #stdlib
- tuts/python3/stdlib_module/smtplib/SMTPNotSupportedError shared tags: #smtplib, #stdlib