On this page
smtplib.SMTPSenderRefused
Prev: smtplib.SMTPResponseException | Up: smtplib | Next: smtplib.SMTPServerDisconnected
Rel: smtplib.quoteaddr, smtplib.quotedata, smtplib.SMTP, smtplib.SMTP_SSL
Ref: docs.python.org โ smtplib.SMTPSenderRefused
Tags: #public #python3 #stdlib #smtplib
Import
import smtplib
from smtplib import SMTPSenderRefused
Signature & Overview
smtplib.SMTPSenderRefused(code, msg, sender)
Sender address refused.
Methods & Attributes
SMTPSenderRefused.add_note(self, note, /)โ Add a note to the exceptionSMTPSenderRefused.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import smtplib
assert issubclass(smtplib.SMTPSenderRefused, smtplib.SMTPResponseException)
Gotchas
- Server rejected the
MAIL FROMsender address (often SPF/DMARC or domain mismatch).
REPL Inspect
from smtplib import SMTPSenderRefused
help(SMTPSenderRefused)
Linked from
Related notes
- tuts/python3/stdlib_module/smtplib/SMTPResponseException Linked here; links to this page; shared tags: #smtplib, #stdlib
- tuts/python3/stdlib_module/smtplib/SMTPServerDisconnected 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/SMTPConnectError shared tags: #smtplib, #stdlib
- tuts/python3/stdlib_module/smtplib/SMTPDataError shared tags: #smtplib, #stdlib