POST api/SMTP/TestSMTP

Request Information

URI Parameters

None.

Body Parameters

SMTPTest
NameDescriptionTypeAdditional information
smtpSection

SmtpSection

None.

sendTo

string

None.

IsSMTPTested

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "smtpSection": {
    "deliveryMethod": 0,
    "deliveryFormat": 0,
    "from": "sample string 1",
    "network": {
      "defaultCredentials": false,
      "host": null,
      "targetName": null,
      "clientDomain": null,
      "password": null,
      "port": 25,
      "userName": null,
      "enableSsl": false,
      "lockAttributes": [],
      "lockAllAttributesExcept": [],
      "lockElements": [],
      "lockAllElementsExcept": [],
      "lockItem": false,
      "elementInformation": {
        "properties": [
          {
            "name": "defaultCredentials",
            "value": false,
            "defaultValue": false,
            "valueOrigin": 0,
            "isModified": false,
            "isKey": false,
            "isRequired": false,
            "isLocked": true,
            "source": "",
            "lineNumber": 0,
            "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
            "validator": {},
            "converter": {},
            "description": null
          },
          {
            "name": "host",
            "value": null,
            "defaultValue": null,
            "valueOrigin": 0,
            "isModified": false,
            "isKey": false,
            "isRequired": false,
            "isLocked": true,
            "source": "",
            "lineNumber": 0,
            "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
            "validator": {},
            "converter": {},
            "description": null
          },
          {
            "name": "clientDomain",
            "value": null,
            "defaultValue": null,
            "valueOrigin": 0,
            "isModified": false,
            "isKey": false,
            "isRequired": false,
            "isLocked": true,
            "source": "",
            "lineNumber": 0,
            "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
            "validator": {},
            "converter": {},
            "description": null
          },
          {
            "name": "password",
            "value": null,
            "defaultValue": null,
            "valueOrigin": 0,
            "isModified": false,
            "isKey": false,
            "isRequired": false,
            "isLocked": true,
            "source": "",
            "lineNumber": 0,
            "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
            "validator": {},
            "converter": {},
            "description": null
          },
          {
            "name": "port",
            "value": 25,
            "defaultValue": 25,
            "valueOrigin": 0,
            "isModified": false,
            "isKey": false,
            "isRequired": false,
            "isLocked": true,
            "source": "",
            "lineNumber": 0,
            "type": "System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
            "validator": {},
            "converter": {},
            "description": null
          },
          {
            "name": "userName",
            "value": null,
            "defaultValue": null,
            "valueOrigin": 0,
            "isModified": false,
            "isKey": false,
            "isRequired": false,
            "isLocked": true,
            "source": "",
            "lineNumber": 0,
            "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
            "validator": {},
            "converter": {},
            "description": null
          },
          {
            "name": "targetName",
            "value": null,
            "defaultValue": null,
            "valueOrigin": 0,
            "isModified": false,
            "isKey": false,
            "isRequired": false,
            "isLocked": true,
            "source": "",
            "lineNumber": 0,
            "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
            "validator": {},
            "converter": {},
            "description": null
          },
          {
            "name": "enableSsl",
            "value": false,
            "defaultValue": false,
            "valueOrigin": 0,
            "isModified": false,
            "isKey": false,
            "isRequired": false,
            "isLocked": true,
            "source": "",
            "lineNumber": 0,
            "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
            "validator": {},
            "converter": {},
            "description": null
          }
        ],
        "isPresent": false,
        "isLocked": false,
        "isCollection": false,
        "source": null,
        "lineNumber": 0,
        "type": "System.Net.Configuration.SmtpNetworkElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
        "validator": {},
        "errors": []
      },
      "currentConfiguration": null
    },
    "specifiedPickupDirectory": {
      "pickupDirectoryLocation": null,
      "lockAttributes": [],
      "lockAllAttributesExcept": [],
      "lockElements": [],
      "lockAllElementsExcept": [],
      "lockItem": false,
      "elementInformation": {
        "properties": [
          {
            "name": "pickupDirectoryLocation",
            "value": null,
            "defaultValue": null,
            "valueOrigin": 0,
            "isModified": false,
            "isKey": false,
            "isRequired": false,
            "isLocked": true,
            "source": "",
            "lineNumber": 0,
            "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
            "validator": {},
            "converter": {},
            "description": null
          }
        ],
        "isPresent": false,
        "isLocked": false,
        "isCollection": false,
        "source": null,
        "lineNumber": 0,
        "type": "System.Net.Configuration.SmtpSpecifiedPickupDirectoryElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
        "validator": {},
        "errors": []
      },
      "currentConfiguration": null
    },
    "sectionInformation": {
      "sectionName": "",
      "name": "",
      "allowDefinition": 300,
      "allowExeDefinition": 100,
      "overrideModeDefault": 1,
      "allowLocation": true,
      "allowOverride": true,
      "overrideMode": 0,
      "overrideModeEffective": 1,
      "configSource": "",
      "inheritInChildApplications": true,
      "isDeclared": false,
      "isDeclarationRequired": false,
      "isLocked": false,
      "isProtected": false,
      "configurationBuilder": null,
      "protectionProvider": null,
      "restartOnExternalChanges": true,
      "requirePermission": true,
      "type": null,
      "forceSave": false
    },
    "lockAttributes": [],
    "lockAllAttributesExcept": [],
    "lockElements": [],
    "lockAllElementsExcept": [],
    "lockItem": true,
    "elementInformation": {
      "properties": [
        {
          "name": "deliveryMethod",
          "value": 0,
          "defaultValue": 0,
          "valueOrigin": 2,
          "isModified": true,
          "isKey": false,
          "isRequired": false,
          "isLocked": true,
          "source": "",
          "lineNumber": 0,
          "type": "System.Net.Mail.SmtpDeliveryMethod, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
          "validator": {},
          "converter": {},
          "description": null
        },
        {
          "name": "deliveryFormat",
          "value": 0,
          "defaultValue": 0,
          "valueOrigin": 2,
          "isModified": true,
          "isKey": false,
          "isRequired": false,
          "isLocked": true,
          "source": "",
          "lineNumber": 0,
          "type": "System.Net.Mail.SmtpDeliveryFormat, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
          "validator": {},
          "converter": {},
          "description": null
        },
        {
          "name": "from",
          "value": "sample string 1",
          "defaultValue": null,
          "valueOrigin": 2,
          "isModified": true,
          "isKey": false,
          "isRequired": false,
          "isLocked": true,
          "source": "",
          "lineNumber": 0,
          "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
          "validator": {},
          "converter": {},
          "description": null
        },
        {
          "name": "network",
          "value": {
            "defaultCredentials": false,
            "host": null,
            "targetName": null,
            "clientDomain": null,
            "password": null,
            "port": 25,
            "userName": null,
            "enableSsl": false,
            "lockAttributes": [],
            "lockAllAttributesExcept": [],
            "lockElements": [],
            "lockAllElementsExcept": [],
            "lockItem": false,
            "elementInformation": {
              "properties": [
                {
                  "name": "defaultCredentials",
                  "value": false,
                  "defaultValue": false,
                  "valueOrigin": 0,
                  "isModified": false,
                  "isKey": false,
                  "isRequired": false,
                  "isLocked": true,
                  "source": "",
                  "lineNumber": 0,
                  "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                  "validator": {},
                  "converter": {},
                  "description": null
                },
                {
                  "name": "host",
                  "value": null,
                  "defaultValue": null,
                  "valueOrigin": 0,
                  "isModified": false,
                  "isKey": false,
                  "isRequired": false,
                  "isLocked": true,
                  "source": "",
                  "lineNumber": 0,
                  "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                  "validator": {},
                  "converter": {},
                  "description": null
                },
                {
                  "name": "clientDomain",
                  "value": null,
                  "defaultValue": null,
                  "valueOrigin": 0,
                  "isModified": false,
                  "isKey": false,
                  "isRequired": false,
                  "isLocked": true,
                  "source": "",
                  "lineNumber": 0,
                  "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                  "validator": {},
                  "converter": {},
                  "description": null
                },
                {
                  "name": "password",
                  "value": null,
                  "defaultValue": null,
                  "valueOrigin": 0,
                  "isModified": false,
                  "isKey": false,
                  "isRequired": false,
                  "isLocked": true,
                  "source": "",
                  "lineNumber": 0,
                  "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                  "validator": {},
                  "converter": {},
                  "description": null
                },
                {
                  "name": "port",
                  "value": 25,
                  "defaultValue": 25,
                  "valueOrigin": 0,
                  "isModified": false,
                  "isKey": false,
                  "isRequired": false,
                  "isLocked": true,
                  "source": "",
                  "lineNumber": 0,
                  "type": "System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                  "validator": {},
                  "converter": {},
                  "description": null
                },
                {
                  "name": "userName",
                  "value": null,
                  "defaultValue": null,
                  "valueOrigin": 0,
                  "isModified": false,
                  "isKey": false,
                  "isRequired": false,
                  "isLocked": true,
                  "source": "",
                  "lineNumber": 0,
                  "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                  "validator": {},
                  "converter": {},
                  "description": null
                },
                {
                  "name": "targetName",
                  "value": null,
                  "defaultValue": null,
                  "valueOrigin": 0,
                  "isModified": false,
                  "isKey": false,
                  "isRequired": false,
                  "isLocked": true,
                  "source": "",
                  "lineNumber": 0,
                  "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                  "validator": {},
                  "converter": {},
                  "description": null
                },
                {
                  "name": "enableSsl",
                  "value": false,
                  "defaultValue": false,
                  "valueOrigin": 0,
                  "isModified": false,
                  "isKey": false,
                  "isRequired": false,
                  "isLocked": true,
                  "source": "",
                  "lineNumber": 0,
                  "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                  "validator": {},
                  "converter": {},
                  "description": null
                }
              ],
              "isPresent": false,
              "isLocked": false,
              "isCollection": false,
              "source": null,
              "lineNumber": 0,
              "type": "System.Net.Configuration.SmtpNetworkElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
              "validator": {},
              "errors": []
            },
            "currentConfiguration": null
          },
          "defaultValue": null,
          "valueOrigin": 1,
          "isModified": false,
          "isKey": false,
          "isRequired": false,
          "isLocked": true,
          "source": "",
          "lineNumber": 0,
          "type": "System.Net.Configuration.SmtpNetworkElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
          "validator": {},
          "converter": null,
          "description": null
        },
        {
          "name": "specifiedPickupDirectory",
          "value": {
            "pickupDirectoryLocation": null,
            "lockAttributes": [],
            "lockAllAttributesExcept": [],
            "lockElements": [],
            "lockAllElementsExcept": [],
            "lockItem": false,
            "elementInformation": {
              "properties": [
                {
                  "name": "pickupDirectoryLocation",
                  "value": null,
                  "defaultValue": null,
                  "valueOrigin": 0,
                  "isModified": false,
                  "isKey": false,
                  "isRequired": false,
                  "isLocked": true,
                  "source": "",
                  "lineNumber": 0,
                  "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                  "validator": {},
                  "converter": {},
                  "description": null
                }
              ],
              "isPresent": false,
              "isLocked": false,
              "isCollection": false,
              "source": null,
              "lineNumber": 0,
              "type": "System.Net.Configuration.SmtpSpecifiedPickupDirectoryElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
              "validator": {},
              "errors": []
            },
            "currentConfiguration": null
          },
          "defaultValue": null,
          "valueOrigin": 1,
          "isModified": false,
          "isKey": false,
          "isRequired": false,
          "isLocked": true,
          "source": "",
          "lineNumber": 0,
          "type": "System.Net.Configuration.SmtpSpecifiedPickupDirectoryElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
          "validator": {},
          "converter": null,
          "description": null
        }
      ],
      "isPresent": false,
      "isLocked": false,
      "isCollection": false,
      "source": null,
      "lineNumber": 0,
      "type": "System.Net.Configuration.SmtpSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
      "validator": {},
      "errors": []
    },
    "currentConfiguration": null
  },
  "sendTo": "sample string 1",
  "issmtpTested": true
}

text/xml

Sample:
<SMTPTest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CampusLogicEvents.Implementation.Models">
  <IsSMTPTested>true</IsSMTPTested>
  <sendTo>sample string 1</sendTo>
  <smtpSection xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Net.Configuration">
    <LockItem xmlns="http://schemas.datacontract.org/2004/07/System.Configuration">true</LockItem>
    <d2p1:DeliveryFormat>SevenBit</d2p1:DeliveryFormat>
    <d2p1:DeliveryMethod>Network</d2p1:DeliveryMethod>
    <d2p1:From>sample string 1</d2p1:From>
  </smtpSection>
</SMTPTest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'SMTPTest'.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.