Add recipients in the ‘To’ field, you can also add recipients in Cc and Bcc field. S.sendmail(SEND_FROM, send_to, multipart. Sign in to Gmail, select the emails you want to send as an attachment, click more (three dots) and click ‘Forward as attachment’. I am not familiar with the Outlook Python tools for sending emails, I use SMTP: from import MIMEApplicationįrom import MIMEMultipart In that case, we need to create the ExcelWriter ourselves, and wrap a BytesIO with it. Unfortunately, _excel works with either a string (interpreted as a path) or an ExcelWriter. That works, because to_csv expects a string (interpreted as a path) or a file handle, and StringIO can be used like a file handle. That works nicely, using a StringIO along with _csv: import io Have you tried to play with the io module in Python 3? It allows you to use streams as file-like objects, so that APIs that expect a file can read from or save their content to the stream instead.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |