Skicka anonyma mail Send-MailMessage

$anonUsername = "anonymous"
$anonPassword = ConvertTo-SecureString -String "anonymous" -AsPlainText -Force
$anonCredentials = New-Object System.Management.Automation.PSCredential($anonUsername,$anonPassword)

Send-MailMessage -to "nisse@contoso.com" -from "noreply@contoso.com" -subject "Email test from..." -credential $anonCredentials -SmtpServer mail.contoso.com -Attachments "C:\temp\path.txt"