none
SendUsingAccount is not working - Powershell Outlook

    Question

  • I am trying to send en email with the below code.Only for the default outlook profile the code is working as expected , I need to send email from another outlook account. "sendusingaccount" property is no useful , below is the code. Please let me know any thoughts on this.

    $argument=0
    $outlook = New-Object -ComObject outlook.application
    $appointment = $outlook.CreateItem(0)
    $appointment.Subject = "subject"
    $appointment.Body = "body"
    $mail = "toaccount@technet.com"
    $appointment.To=$mail
    $appointment.SendUsingAccount="fromaccount@gmail.com"

    $appointment.send()


    Prathap SV

    Monday, March 27, 2017 12:42 PM

All replies