J
Jeff Sandys
Can you include a subject with sendmail using smtplib?
When I do this (names changed to protect the innocent):
import smtplib
toadr = "(e-mail address removed)"
frmadr = "(e-mail address removed)"
msg = "this is an important message."
server = smtplib.SMTP('localhost')
server.sendmail(frmadr, toadr, msg)
server.quit()
I get the important message with a blank subject line.
It would be really useful to add a subject line,
sub = "important message"
server.sendmail(frmadr, toadr, msg, subject=sub)
I've looked through the documentation and see that
there is a mail_options but haven't found anything
about adding a subject.
Thanks,
Jeff Sandys
When I do this (names changed to protect the innocent):
import smtplib
toadr = "(e-mail address removed)"
frmadr = "(e-mail address removed)"
msg = "this is an important message."
server = smtplib.SMTP('localhost')
server.sendmail(frmadr, toadr, msg)
server.quit()
I get the important message with a blank subject line.
It would be really useful to add a subject line,
sub = "important message"
server.sendmail(frmadr, toadr, msg, subject=sub)
I've looked through the documentation and see that
there is a mail_options but haven't found anything
about adding a subject.
Thanks,
Jeff Sandys