How To Send SMTP Mail Using PowerShell And Office 365

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

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

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

    Thanks mate, hours searching and failing and your video resolved it on the 1st go 🤗

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

      Hi , which email did you use , outlook , gmail or any other?

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

    Good Vid Bernard, saved me a lot of trouble from trying to use MS Graph, a few pointers though, for unattended scripts, better to use the Microsoft Secret module, so for your credential you just pass " $creds = Get-Credential (Get-Secret -Vault MySecretVault -Name MySecretKey)",, Is there a reason you didn't just run the code from within VSCode but rather decided to copy and paste it in Powershell?

  • @lordsasta2k13
    @lordsasta2k13 16 วันที่ผ่านมา

    Did anyone got the solution , i think the issue is 2FA or MFA

  • @Aayush588
    @Aayush588 7 หลายเดือนก่อน

    How to add sensitivity label ?

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

    Thank you for the video, its was very useful.. can you please let me know how to attach .pdf file

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

    Really helped alot man. Ty

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

    Thanks a lot I can send email using this, how we can add attachment and please let us know.

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

    Thank you for your video.
    I got an error: "send-MailMessage: The SMTP server requires a secure connection or the client was not authenticated. The server response was; 5.7.57 client was not authenticated to send mail. Error 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully." Do you know what can I do about it? (I'm using my employer account).
    Thanks a lot

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

      Same issue here, does anyone have a tip ? SMTP Auth already set on o365 for this account

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

      I got this when trying to send from a gmail account. I think google has strict security restrictions recently. Switched to an outlook account and the script ran error free.

    • @AshokYadav-is7wx
      @AshokYadav-is7wx ปีที่แล้ว

      @@karanjadavid2178 You have to do fowlling things
      1.go to gmail -->Setting-->Accounts and Imports tab -->Other google account setting --->Security Section
      2.trun on 2 Step verification
      3.create an APP Password
      4.Copy that APP Password
      5.Pate into the $pwd_1=" Your App Password " then just run the script you will able to send mails

    • @AshokYadav-is7wx
      @AshokYadav-is7wx ปีที่แล้ว

      If works Please message me back

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

      Did anyone got the solution for this ?

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

    Thank you for this.

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

    Very very thank you.!

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

    Will this method still work with the deprecation of SMTP AUTH on 1st October??

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

      I tried today 27th October 2022, can send email using above video tutorial

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

    oauth v2.... not this old and insecure way

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

    Send-MailMessage : A positional parameter cannot be found that accepts argument 'r'.
    At line:1 char:1
    + Send-MailMessage @props @body
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Send-MailMessage], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SendMailMessage