I am trying to setup my outgoing email from Sharepoint on premises. I need to configure smtp settings by the script given on IIS official web , but I received an error
\windows\system32\inetsrv\appcmd set config /commit:WEBROOT /section:smtp /from:webmaster@mydomain.com /deliveryMethod:network /network.port:80 /network.defaultCredentials:False /network.host:smtp.host.com /network.userName:web@mydomain.com /network.password:password
But the error I get after executing above script is
Error Message: Unknown Attribute "deliveryMethod" ..Resaon: Enum must be one of network, specified Pickup directories.
I am unable to track this error and unable to find relevant solution to the issue