I have a bit of powershell to send an e-mail:
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($emailFrom, $emailTo, $subject, $body)
This works perfectly on every machine I've ever tried it on until today. I have one machine where I get this error message:
Exception calling "Send" with "4" argument(s): "Failure sending mail." At R:\sqlrestore\scripts\Utilities\Check-Lag.ps1:15 char:12 + $smtp.Send <<<< ($emailFrom, $emailTo, $subject, $body) + CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : DotNetMethodException