Send email from Outlook with Powershell !

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

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

  • @MrPowerScripts
    @MrPowerScripts  6 ปีที่แล้ว

    Website: mrpowerscripts.com
    Discord: discord.gg/uEBWZKq
    Patreon: patreon.com/mrpowerscripts
    SIGN UP: mrpowerscripts.com/mailing-list

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

    Thanks mate, worked flawlessly, great video, even managed to add attachment.

    • @MrPowerScripts
      @MrPowerScripts  6 ปีที่แล้ว

      glad to hear. thanks

    • @animeshchittora5693
      @animeshchittora5693 3 ปีที่แล้ว

      Can you please help me to use attachment I am facing issues in it?

    • @stephenbrincat7124
      @stephenbrincat7124 3 ปีที่แล้ว

      @@animeshchittora5693 send me your email and I'll forward you the script

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

    This code works , Good job you saved lot of work thanks a lot

  • @michakropkowski5636
    @michakropkowski5636 3 ปีที่แล้ว

    Mr., you're genius!

    • @MrPowerScripts
      @MrPowerScripts  3 ปีที่แล้ว

      I am not. I just read the documentation.

  • @NicolasJ12
    @NicolasJ12 3 ปีที่แล้ว

    Thanks for the brief and efficient tuto
    One thing I can't figure out is how to send that same email from different email accounts defined in my Outlook
    Any ideas?

  • @sumatysumaty4088
    @sumatysumaty4088 5 ปีที่แล้ว

    This video helps. Thank you.
    Could you please do a video to know how to auto forward the emails ?

  • @MrPowerScripts
    @MrPowerScripts  11 ปีที่แล้ว

    Not directly, but there are plenty of utilities that have command line interfaces which you can utilize with Powershell. Just google "Command Line Video Converter" and you should be able to find some resources.

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

    Not working with the following error.
    $OL : The term '$OL' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + $OL = New-Object -ComObject outlook.application + ~~~~ + CategoryInfo : ObjectNotFound: ($OL:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

  • @tech2go224
    @tech2go224 3 ปีที่แล้ว

    Thank you for this video! i would to ask, what if i have several emails in my outlook and would like to define the one that will send the email? how do i do that?

  • @MrPowerScripts
    @MrPowerScripts  11 ปีที่แล้ว

    You can actually send emails very easily in Powershell using the Send-MailMessage cmdlet (3.0). This video was just a simple demonstration to see the Outlook Object Model in action, which I plan to explore more in the future. :)

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

    it works very well thanks it helps

  • @fayyazali2217
    @fayyazali2217 5 ปีที่แล้ว

    Hi, I need to send an automated email from outlook 2013 using powershell at a perticular time. Please help me to write the script. Also I am not able to find the SMTP server in my office outlook. Can you please help. Regards

  • @adityabadhe3295
    @adityabadhe3295 5 ปีที่แล้ว

    Hi, Could you help me with this? So I need to move messages with specific words in the body to a folder in outlook using powershell

  • @ByronDReese
    @ByronDReese 11 ปีที่แล้ว

    cool video. could you possibly do a video on using using powershell with MS excel?

  • @portentouslad5051
    @portentouslad5051 9 ปีที่แล้ว

    is there a way to add new/additional mailboxes/accounts to outlook vie powershell? Looking to simplifying that process for many users.

    • @MrPowerScripts
      @MrPowerScripts  9 ปีที่แล้ว

      +Portentous Lad Like this? social.technet.microsoft.com/Forums/office/en-US/a7c357c5-7f80-4059-9872-c1409acfc536/powershell-add-mail-profile?forum=outlook

    • @portentouslad5051
      @portentouslad5051 9 ปีที่แล้ว

      yes that's kind of it. I just haven't added the module yet to test it since it's my work laptop. Is it an official one? And further more, do you need a pssnap-in for the excel stuff in your other video too?

    • @MrPowerScripts
      @MrPowerScripts  9 ปีที่แล้ว

      +Portentous Lad The excel video is just native Powershell code interacting with Exel through the Excel Object Model via a Com interace. You may be able to do what you need to do by manipulating Outlook via the Com interface as well, which is what i'm doing in the video above. I'm not sure though. Some snap-ins/modules can make the process easier.
      msdn.microsoft.com/en-us/library/ms268893.aspx

  • @MrPowerScripts
    @MrPowerScripts  11 ปีที่แล้ว

    Absolutely! I've worked with a number of scripts that can manipulate excel. Let me see some simple examples I can put together. Hopefully i'll have something uploaded this weekend.

  • @ehfo
    @ehfo 7 ปีที่แล้ว

    pls do one with attachment

  • @djbv808
    @djbv808 3 ปีที่แล้ว

    Hey Mr powershell this is awesome thanks for the video I'm using this as part of a bigger script for automation but I'm becoming stuck as I also want to add an attachment to the email so far my attempts have failed! Any input greatly appreciated!

  • @tracynguyen4458
    @tracynguyen4458 6 ปีที่แล้ว

    Hi, Thanks for this video, very helpful! Can you please show code on how to attach files? I tried the below but got this error message: $mItem.Attachments = "X:\test.xlsx"
    Exception setting "Attachments": "Property is read-only."
    At line:23 char:8
    + $mItem.

    • @MrPowerScripts
      @MrPowerScripts  6 ปีที่แล้ว

      Hello Tracy. Here's the docs on the Attachments object. You'll see that you need to use the Add method on the attachements object to attache a file. It might look something like $mitem.Attachments.Add('path/to/file') msdn.microsoft.com/en-us/vba/outlook-vba/articles/attachment-object-outlook

  • @immanuelsuleiman7550
    @immanuelsuleiman7550 4 ปีที่แล้ว

    this is baller as fuck

  • @MrPowerScripts
    @MrPowerScripts  11 ปีที่แล้ว

    Check the latest video. It's about excel.