none
Problems configuring a SMTP server RRS feed

  • Question

  • I configured a SMTP server using port 20.  I use anonymous access and most of the standard options.  I did have to change the access for port 25 to allow all users to get in.  I use the following Power Shell script to test it:

        $EmailTo                = “doan5@msn.com”
        $EmailFrom              = “kirkdoan21@gmail.com”
        $Subject                = "SUBJE7T-7”
        $Body                   = "BODY-7”
        $SMTPServer             = “ST-App01-Dev.wbtvm.com”
        $SMTPClient             = New-Object Net.Mail.SmtpClient($SmtpServer, 25)
        $SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)

    I receive the following error:

    Exception calling "Send" with 4 argument(s): "Failure sending mail."

    At line:1 char:5

    +    $SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)

    +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      + CategoryInfo            : Not Specified: (:)  [], MethodInvocationException

      + FullyQualifiedErrorId : SmtpException

    Wednesday, July 29, 2015 3:49 PM