2

I'm using powershell cmdlet

send-mailmessage `
                    -SmtpServer 192.168.170.56 `
                    -to "<[email protected]>" `
                    -from "SFRBsendingScr <[email protected]>" `
                    -subject "(test) PRIMFRB transfer $date" `
                    -body "$teloadmin" -BodyAsHtml `
                    -ErrorAction Stop

for sending emails, but our smtp server (LotusNotes) require authentication to send emails out of our company. Ho can I add authentication, or is there another way to do it? Thank you

5
  • 4
    have you try the -credential parameter?
    – CB.
    Apr 18, 2012 at 7:19
  • No, I found -credential parameter in PS documentation example, but it contains domain\name. I need to enter name and password..
    – culter
    Apr 18, 2012 at 7:44
  • 1
    I made the test with -credential parameter on one of my SMTP internet relay that use authentication and it works, but the SMTP server is a Microsoft one, so it probably accept one of the Microsoft Authentication supported by PSCredentials. I use login/password.
    – JPBlanc
    Apr 18, 2012 at 8:04
  • It works for LN too. Write an answer.
    – culter
    Apr 18, 2012 at 8:14
  • 1
    @Christian, you can put your comment as an answer it seem to work for both Exchange SMTP an Lotus SMTP.
    – JPBlanc
    Apr 18, 2012 at 9:57

1 Answer 1

2

As i commented you can add -credential parameter to send-mailmessage like -credential (get-credential) and fill it using valid userid and password

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.