Server

<back to all web services

SmtpConfigSsl

Requires Authentication
The following routes are available for this service:
POST/files/Ssl
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


class SecurityType(str, Enum):
    SSL = 'Ssl'
    TLS = 'Tls'
    CERTIFICATE = 'Certificate'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SmtpConfig(IReturn[SmtpConfigResponse]):
    host: Optional[str] = None
    port: Optional[str] = None
    security_type: Optional[SecurityType] = None
    username: Optional[str] = None
    password: Optional[str] = None
    smtp_from_email: Optional[str] = None
    @staticmethod
    def response_type(): return SmtpConfigResponse


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SmtpConfigResponse:
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SmtpConfigSsl(SmtpConfig):
    security_type: Optional[SecurityType] = None

Python SmtpConfigSsl DTOs

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

HTTP + CSV

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

POST /files/Ssl HTTP/1.1 
Host: depolt-servdesk.eras-online.de 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"SecurityType":"Ssl","Host":"String","Port":"String","Username":"String","Password":"String","SmtpFromEmail":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}