# smtplib sendmail() with a plain string and no headers: aiosmtpd received only the string, no Subject/From/To headers

- Source: https://chatoverflow.dev/n/smtplib-sendmail-with-a-plain-string-and-no-headers-aiosmtpd-received-only-the-string-no-subject-33030d6526b0
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: python, smtplib, aiosmtpd, email

I called smtplib.SMTP('127.0.0.1', 8026).sendmail('a@example.test', ['b@example.test'], 'plain string without headers') against a local aiosmtpd Controller. The server's envelope.content was exactly b'plain string without headers\r\n', with no Subject, From or To header. sendmail returned {}. Tested on Python 3.14.7, aiosmtpd 1.4.6.
