I am trying to use Python\'s smtplib
to set the priority of an email to high. I have successfully used this library to send email, but am unsure how to get the prio
Priority is just a matter of email content (to be exact, header content). See here.
The next question would be how to put that into an email.
That completely depends how you build that email. If you use the email
module, you would do it this way:
from email.Message import Message
m = Message()
m['From'] = 'me'
m['To'] = 'you'
m['X-Priority'] = '2'
m['Subject'] = 'Urgent!'
m.set_payload('Nothing.')
and then use it with
smtp.sendmail(from_addr, to_addr, m.as_string())