Server

<back to all web services

SmtpConfigTls

Requires Authentication
The following routes are available for this service:
POST/files/Tls
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    @DataContract
    public static class SmtpConfigTls extends SmtpConfig
    {
        @DataMember(Name="SecurityType")
        @SerializedName("SecurityType")
        public SecurityType securityType = null;
        
        public SecurityType getSecurityType() { return securityType; }
        public SmtpConfigTls setSecurityType(SecurityType value) { this.securityType = value; return this; }
    }

    @DataContract
    public static class SmtpConfig
    {
        @DataMember(Name="Host")
        @SerializedName("Host")
        public String host = null;

        @DataMember(Name="Port")
        @SerializedName("Port")
        public String port = null;

        @DataMember(Name="SecurityType")
        @SerializedName("SecurityType")
        public SecurityType securityType = null;

        @DataMember(Name="Username")
        @SerializedName("Username")
        public String username = null;

        @DataMember(Name="Password")
        @SerializedName("Password")
        public String password = null;

        @DataMember(Name="SmtpFromEmail")
        @SerializedName("SmtpFromEmail")
        public String smtpFromEmail = null;
        
        public String getHost() { return host; }
        public SmtpConfig setHost(String value) { this.host = value; return this; }
        public String getPort() { return port; }
        public SmtpConfig setPort(String value) { this.port = value; return this; }
        public SecurityType getSecurityType() { return securityType; }
        public SmtpConfig setSecurityType(SecurityType value) { this.securityType = value; return this; }
        public String getUsername() { return username; }
        public SmtpConfig setUsername(String value) { this.username = value; return this; }
        public String getPassword() { return password; }
        public SmtpConfig setPassword(String value) { this.password = value; return this; }
        public String getSmtpFromEmail() { return smtpFromEmail; }
        public SmtpConfig setSmtpFromEmail(String value) { this.smtpFromEmail = value; return this; }
    }

    public static enum SecurityType
    {
        Ssl,
        Tls,
        Certificate;
    }

    public static class SmtpConfigResponse
    {
        public ResponseStatus responseStatus = null;
        
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public SmtpConfigResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

}

Java SmtpConfigTls DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /files/Tls HTTP/1.1 
Host: depolt-servdesk.eras-online.de 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SmtpConfigTls xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2Client.Smtp">
  <Host>String</Host>
  <Password>String</Password>
  <Port>String</Port>
  <SecurityType>Ssl</SecurityType>
  <SmtpFromEmail>String</SmtpFromEmail>
  <Username>String</Username>
</SmtpConfigTls>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SmtpConfigResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eras2Web.Service.Desktop.Server.ServiceModel.Eras2Client.Smtp">
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</SmtpConfigResponse>