CPU.Notifications

<back to all web services

ValidateEmail

The following routes are available for this service:
POST/ValidateEmail
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CPU.Notifications.ServiceModel
Imports CPU.SendGridAPI

Namespace Global

    Namespace CPU.Notifications.ServiceModel

        Public Partial Class ValidateEmail
            Public Overridable Property Email As String
            Public Overridable Property Source As String
        End Class
    End Namespace

    Namespace CPU.SendGridAPI

        Public Partial Class Additional
            Public Overridable Property HasKnownBounces As Boolean
            Public Overridable Property HasSpamReports As Boolean
            Public Overridable Property HasSuspectedBounces As Boolean
            Public Overridable Property SpamReportCreated As Date?
        End Class

        Public Partial Class Checks
            Public Overridable Property Additional As Additional
            Public Overridable Property Domain As Domain
            Public Overridable Property LocalPart As LocalPart
        End Class

        Public Partial Class Domain
            Public Overridable Property HasMxOrARecord As Boolean
            Public Overridable Property HasValidAddressSyntax As Boolean
            Public Overridable Property IsSuspectedDisposableAddress As Boolean
        End Class

        Public Partial Class EmailValidation
            Public Overridable Property Result As Result
        End Class

        Public Partial Class LocalPart
            Public Overridable Property IsSuspectedRoleAddress As Boolean
        End Class

        Public Partial Class Result
            Public Overridable Property Checks As Checks
            Public Overridable Property Email As String
            Public Overridable Property Host As String
            Public Overridable Property Ip_Address As String
            Public Overridable Property Local As String
            Public Overridable Property Score As Single
            Public Overridable Property Source As String
            Public Overridable Property Suggestion As String
            Public Overridable Property Verdict As String
        End Class
    End Namespace
End Namespace

VB.NET ValidateEmail DTOs

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

HTTP + OTHER

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

POST /ValidateEmail HTTP/1.1 
Host: cpmwebservices-t.clarkpud.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"email":"String","source":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"result":{"checks":{"additional":{"hasKnownBounces":false,"hasSpamReports":false,"hasSuspectedBounces":false,"spamReportCreated":"\/Date(-62135596800000-0000)\/"},"domain":{"hasMxOrARecord":false,"hasValidAddressSyntax":false,"isSuspectedDisposableAddress":false},"localPart":{"isSuspectedRoleAddress":false}},"email":"String","host":"String","ip_Address":"String","local":"String","score":0,"source":"String","suggestion":"String@String","verdict":"String"}}