How To Send An Outlook Email With Attachments Using Python (using pywin32)

Поделиться
HTML-код
  • Опубликовано: 4 дек 2024

Комментарии • 42

  • @senhamat
    @senhamat 2 года назад +1

    Worked perfectly. Only missed the signature at the end of the body
    If I find it how, I will post it here.

  • @hermanf6410
    @hermanf6410 Год назад

    Thanks for the video.

  • @scho1z
    @scho1z 2 года назад

    Thank you very much! 😃 greetings from Santiago, Chile

  • @oscarrojas7380
    @oscarrojas7380 11 месяцев назад

    Thanks a lot it was useful for me. The thing is once it worked, we created a sharebox within my existent email in outlook application, to have a kind of specific email account to send reports... and it didn't work anymore. Do you know if I should change something to use it with a sharebox

  • @pravallikaa3306
    @pravallikaa3306 Год назад

    Thank you for this . Could you please explain a)How to send these mails as reply to previous mails(from the same user ofcourse) b)How do I fetch the body of the email(let's say if from a specific sender) using python(I intend on running a program and mailing back the output to the sender)

  • @terry9026955
    @terry9026955 2 года назад

    This is so helpful!!!
    Thanks you~

  • @juanpablogilyepes7255
    @juanpablogilyepes7255 Год назад

    Muchas gracias.... Me funcionó 😃

  • @gd6noob
    @gd6noob 2 года назад

    Awesome video.
    If I had an excel/csv file with the following:
    SentTo, CC, BCC, Subject, Message Body and attachments
    How would I sent bulk emails using this file?

  • @basavrajr8577
    @basavrajr8577 2 года назад

    Thanks Jie.... very helpful for me.. using this.. above video.. i can create mail and attach mail which is present in outlook inbox mail ... and send.. :)

    • @jiejenn
      @jiejenn  2 года назад

      Glad the video helped.

  • @immanuelsuleiman7550
    @immanuelsuleiman7550 2 года назад

    wonderful
    thank you

  • @alecouto
    @alecouto 2 года назад +1

    Very helpful, can Python automatically download attachments from a specific email and start a process? Suppose someone receiving a database every day from the same e-mail and processing it afterwards.

    • @jiejenn
      @jiejenn  2 года назад +1

      I'm pretty sure you can. What I would do here is to map out the workflow first then figure out how to execute each flow.

    • @alecouto
      @alecouto 2 года назад

      @@jiejenn thank you, I'm an Economist learning some Python to automate stuff and your channel has been really helpful. Thank you for the insights, I'm on stack overflow trying to figure out how to code it, I think many more people have the same problem, and it might be a good project for the channel. Best!

    • @jiejenn
      @jiejenn  2 года назад

      @@alecouto I will keep that in mind.

  • @wiki-infodevelopment3369
    @wiki-infodevelopment3369 2 года назад

    Hello, I like your video. and is there a tuto about saving received attachments of a specific address?

  • @DrOverfloww
    @DrOverfloww 2 года назад

    Super useful, thanks!
    Is it possible to have Python check, wheter the E-Mail was actually sent (or at lease moved to the outbox?)
    Since I would like to run my script automatically every day and send me an E-Mail if needed. However, my organization logs me out after a few days. So I want to make to make my script to stick around and give me a warning messgage, if the email hasn't been sent. So I don't miss some important data.

    • @jiejenn
      @jiejenn  2 года назад

      Not sure. Might have to look into it.

    • @caiocardoso6288
      @caiocardoso6288 Год назад

      I believe you can access your email folder by using getDefaultFolder(6) or something like that not sure if it’s just inbox or if it has some sort of enumeration with indexes for each email folder

  • @trevorwilson5457
    @trevorwilson5457 2 года назад +1

    I used pip install pywin32 and pip install pypiwin32 to try and install the required packages, and it worked, but I am still getting the "no module named win32com" error. Anybody know how to resolve this?

    • @jiejenn
      @jiejenn  2 года назад

      Hey Trevor, are you using a Mac or a PC?

    • @trevorwilson5457
      @trevorwilson5457 2 года назад

      @@jiejenn I'm on PC :)

    • @samuellanteigne9808
      @samuellanteigne9808 Год назад

      FYI for anyone else who installed both modules and still get this error: ensure that you firstly have outlook setup and configured first

  • @sauravsingh2662
    @sauravsingh2662 2 года назад

    Thanks for automation videos,I am using pywin 32 library for sending mail.I have a virtual machine which is not connected to internet. My Virtual Machine has a large Number of users. I would like use outlook /sharepoint alerts/ workflow email to send email to users within the same virtual machine. Can you kindly tell me how to achieve this?

    • @jiejenn
      @jiejenn  2 года назад

      Unfortunately I don't know how.

  • @mrhallen5849
    @mrhallen5849 2 года назад

    i had something similar on perl but my company moving from desktop outlook to web so my script wont wok anymore, can this library open web outlook?

    • @jiejenn
      @jiejenn  2 года назад +1

      For Web Outlook, you will have to use Graph API ruclips.net/video/aYf31kSKvd0/видео.html

  • @everydaysprout
    @everydaysprout 2 года назад

    I have 2 email ids loaded in my outlook. One is shared mail box. Plz let me know how i can send email using shared mail box. It do not have any password. Plz help

  • @donovanforeman2505
    @donovanforeman2505 2 года назад

    Is there anyway to add signatures to these email?

  • @equipboardsubmission
    @equipboardsubmission 2 года назад

    Any idea on why dispatch doesn't display the app?

  • @codeitaviral3
    @codeitaviral3 2 года назад

    pywin32 doesn't works on mac right ?

    • @jiejenn
      @jiejenn  2 года назад

      That's correct. If you are on Mac, you can look into Microsoft Graph API.

  • @kelwinggerson
    @kelwinggerson 2 года назад

    up

  • @lakshitapopli7499
    @lakshitapopli7499 2 года назад

    Hey ,Can you plz share the syntax how to add multiple recipients in mailItem.to=

    • @jiejenn
      @jiejenn  2 года назад +1

      If you want to include multiple recipients, you use a semi-colon to separate the email address. For example, "email1@xyz.com;email2@xyz.com".

    • @lakshitapopli7499
      @lakshitapopli7499 2 года назад

      @@jiejenn okay also want to know can we run this code on server like putty also?