Sending an email with a binary attachment

Anthony Papillion anthony at cajuntechie.org
Mon Feb 29 03:10:00 EST 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello Everyone,

I've been trying to write a /very/ simple script that will email a
binary file to an email address when run. Pretty simple. I've done
quite a bit of research and have finally settled on the following code:

http://pastebin.com/sryj98wW

For some reason though, sending mail is failing every time. I've made
sure that the password is correct (which seems to be the most usual
error).

Still, I just can't get it to work. Can someone take a look at this
code and give me some advice?

Thanks!
Anthony
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJW0/zYAAoJEAKK33RTsEsVH5YP/jisLkuK4SAD6E06dO/czn1V
bO1QlzqTje8giXUWGyVeGS9MHAA1S2TlHc/rp01/DHTt1iYT50qGIaPxzUxBTMEX
mBCFFUSgg6LjkY+9b0c+o4OmviZlX7/KA6wT9IpFEG0l86Uj+z39rcBHm+GauiX+
IgMS5lWXfPmIEwiKzByMduxEgfj6kQW6PhkR5hTmOvd3sbILR91U9NiigrUD1ukM
+eN4LnKVu5Qpyb8X34Ze0NF7tiMr7tTQyBIq6C6ORGR/IPri407Ro8ACHBd55xZV
QxHjFVemms9s7ala0aoBcpRKr4PG35Ebm+7CcZaDj0fdk11mRvpqCZtGfodw/+sL
Crrxoz11hC//DHslZrEuNlJHgRqnsw+abKG8jIaJCrIW1f9BiyiWse+RRwbpN8IY
1C0gD4E1N3dUqGFrhyD/Xuy0tkXWpfiYhcLJQY+j7exrf00s+ASUTrd92lDCzxW4
pwuPZYN6nXY6dh9q72fgoEzqU0eDIzSgX99fODcxqp1L2ieczWMMajlWQJrJEcUe
UgxB8IvlvuD3NpzZXisEG8ZzqhZT6GOurHGbBusAW2M9zaqImb4qGEid7HS4BL/c
Kj7PspXz+8gD3SKZ/dOBdFlKK1KM1utekB0UnmBboZ9nXVhz5qVPaiVgjPunB5TG
1fMuuGiy2yl5pfTNvH8a
=Ff+J
-----END PGP SIGNATURE-----



More information about the Python-list mailing list