Email Automation Using Python | Python Loop on Outlook Inbox | Python Save Attachments in Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 พ.ย. 2024

ความคิดเห็น • 40

  • @anupkumar-m3n
    @anupkumar-m3n 2 หลายเดือนก่อน

    Hi , This video is useful for me.
    Please advise how we can export the subject, body to an excel file for those filter emails with subject

    • @Python2020
      @Python2020  2 หลายเดือนก่อน

      When you can get it, then you can assign to variable and append row in excel using openpyxl.. You can see video on this channel itself

  • @salonitongia
    @salonitongia 11 หลายเดือนก่อน

    Brilliant, can you please create a video on how to fetch otp from outlook mailobx. It would be much helpful.

  • @avinashdudala9490
    @avinashdudala9490 2 หลายเดือนก่อน

    Hi this code not working on New Outlook app can you send me any other approach that works on New Outlook app

  • @manuelpalaciossantil
    @manuelpalaciossantil ปีที่แล้ว

    Excelente, wue modificación se debe hacer para copiar y/o extraer todos los attach. Gracias

  • @prelovedofficialstore4673
    @prelovedofficialstore4673 11 หลายเดือนก่อน

    can you make a video for whatsapp automation so it could help as i am having some troubles in resolving some issues

  • @tenriquez39
    @tenriquez39 9 หลายเดือนก่อน

    Excelent !!! you know how check if mail has executable attachement ?

    • @Python2020
      @Python2020  9 หลายเดือนก่อน

      When you loop on attachment, attachment.name is the property, if name has .exe then it can be considered as executable... Hope I got it right

  • @vsddkkjjhgrreertyfdserrftyh
    @vsddkkjjhgrreertyfdserrftyh 2 ปีที่แล้ว

    Thanks very helpful video 👍What we can do if we have to save only present day attachment from email with specific subject line or mail body string.

    • @Python2020
      @Python2020  2 ปีที่แล้ว

      I m going to do a video on filter in fetail... For now you can check date him recived, if date is today save ... If yesterday break the loop

    • @vsddkkjjhgrreertyfdserrftyh
      @vsddkkjjhgrreertyfdserrftyh 2 ปีที่แล้ว

      Thanks for reply

  • @V.MITHUNCHANNEL
    @V.MITHUNCHANNEL 2 ปีที่แล้ว +1

    Super...

  • @Pratheekkumar12
    @Pratheekkumar12 2 ปีที่แล้ว +1

    Can I please know how to save these attachments to the website means to the URL

    • @Python2020
      @Python2020  2 ปีที่แล้ว +1

      If you can save only on local by this script... But you can copy files to web location if connected to your local folde

  • @nehagote6324
    @nehagote6324 11 หลายเดือนก่อน

    hi i am trying to filter out mail based on subject but I am getting 4096 , ‘Microsoft outlook ‘, ‘The attempted operation failed. An object could not found error. Same code worked in one machine but didn’t worked on other machine. Can u help with this error

    • @Python2020
      @Python2020  11 หลายเดือนก่อน +1

      Give some time sleep after initialization code line...
      Check if that system has web outlook as default
      Folder structure is same for inbox else find inbox by name

  • @coxismail734t
    @coxismail734t ปีที่แล้ว +1

    Hi bro how to add a email forwarding to outlook automatically?

    • @coxismail734t
      @coxismail734t ปีที่แล้ว +1

      if you have any script or link it would be a great help thanks bro

  • @nehagote6324
    @nehagote6324 11 หลายเดือนก่อน

    In if condition mail is filtering out with subject but along with and clause msg.SenderEmailAddress is not working.

    • @Python2020
      @Python2020  11 หลายเดือนก่อน

      There is another video where I am using filter email before loading items using Microsoft email class properties check that one

    • @Python2020
      @Python2020  11 หลายเดือนก่อน

      2- if you are using outlook exchange it might be different property

  • @maileite_
    @maileite_ 2 ปีที่แล้ว

    Thank you! But, I could not figure out how to save atch in another folder.. tried use (os.getcwd() + 'C:\Users\user\Desktop\' + atch.FileName) but didn't work :(

    • @Python2020
      @Python2020  2 ปีที่แล้ว

      Attachment.savesas ...SEARCH python os create folder if not exist..then pass path as variable.... On my channel there is a video as well

  • @vaibhavdhulekar8223
    @vaibhavdhulekar8223 ปีที่แล้ว

    how can i connect to some other outlook account which is not logged in on my desktop. I want to know this because i want this application to be deployed on Virtual Machine(Server). Please help me in this

    • @Python2020
      @Python2020  ปีที่แล้ว

      It is client based api
      ... If the account is o365 you can use api url with credentials

    • @Python2020
      @Python2020  ปีที่แล้ว

      Or you can add that account in your outlook pass the email id as saprate mailbox

    • @vaibhavdhulekar8223
      @vaibhavdhulekar8223 ปีที่แล้ว

      @@Python2020 the account is O365 only, can you please help me by sharing some code snippet. It will be very helpful

    • @vaibhavdhulekar8223
      @vaibhavdhulekar8223 ปีที่แล้ว

      @@Python2020 actually i can't add that account in my outlook id, it is not allowed to us

    • @Python2020
      @Python2020  ปีที่แล้ว

      You should find in goolgle.. Or your it team would bea aware of api url of o365, you have to pass your user details

  • @radheshkhaire6891
    @radheshkhaire6891 3 หลายเดือนก่อน

    Folders object is not callable

  • @asvlogs2288
    @asvlogs2288 ปีที่แล้ว

    I am getting 4096 Microsoft Outlook cannot save the attachment file name or directory is not valid

    • @Python2020
      @Python2020  ปีที่แล้ว +1

      The folder that you are taken in the path should exist... There are few characters are not acceptable in file or folder names check that as well

    • @asvlogs2288
      @asvlogs2288 ปีที่แล้ว

      @@Python2020 i have one more question say if i want to save the attachment with T-1 business date then how can we do that ?

    • @Python2020
      @Python2020  ปีที่แล้ว

      You want to filter the email with t-1 Or create the foder by t-1 or you want to rename file with t-1

    • @asvlogs2288
      @asvlogs2288 ปีที่แล้ว

      I need to rename the attachment file with T-1 date and if it's Monday it should save it on Fridays date

    • @Python2020
      @Python2020  ปีที่แล้ว

      Have look on this video at 3 min... You will get how to get yesterday date and how to format date in required format using strftime... Use underscores in formatting... th-cam.com/video/Jx5gOE_4vWA/w-d-xo.html

  • @pomyfikr8581
    @pomyfikr8581 ปีที่แล้ว

    Nice how to export to excel some portion of email body

    • @Python2020
      @Python2020  ปีที่แล้ว

      When you are reading email mail_item.Body would give you data from mail, then use regex to folter required info