module IHP.Mail.Types
( MailServer (..)
, MailAttachment (..)
, SMTPEncryption (..)
)
where
import IHP.Prelude
import Network.Socket (PortNumber)
data SMTPEncryption = Unencrypted | TLS | STARTTLS
data MailServer =
SES { MailServer -> ByteString
accessKey :: ByteString
, MailServer -> ByteString
secretKey :: ByteString
, MailServer -> Text
region :: Text }
| Sendmail
| SendGrid { MailServer -> Text
apiKey :: Text
, MailServer -> Maybe Text
category :: Maybe Text }
| SMTP { MailServer -> String
host :: String
, MailServer -> PortNumber
port :: PortNumber
, MailServer -> Maybe (String, String)
credentials :: Maybe (String, String)
, MailServer -> SMTPEncryption
encryption :: SMTPEncryption }
data MailAttachment = MailAttachment
{ MailAttachment -> Text
name :: Text
, MailAttachment -> LByteString
content :: LByteString
, MailAttachment -> Text
contentType :: Text
} deriving (MailAttachment -> MailAttachment -> Bool
(MailAttachment -> MailAttachment -> Bool)
-> (MailAttachment -> MailAttachment -> Bool) -> Eq MailAttachment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MailAttachment -> MailAttachment -> Bool
== :: MailAttachment -> MailAttachment -> Bool
$c/= :: MailAttachment -> MailAttachment -> Bool
/= :: MailAttachment -> MailAttachment -> Bool
Eq, Int -> MailAttachment -> ShowS
[MailAttachment] -> ShowS
MailAttachment -> String
(Int -> MailAttachment -> ShowS)
-> (MailAttachment -> String)
-> ([MailAttachment] -> ShowS)
-> Show MailAttachment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MailAttachment -> ShowS
showsPrec :: Int -> MailAttachment -> ShowS
$cshow :: MailAttachment -> String
show :: MailAttachment -> String
$cshowList :: [MailAttachment] -> ShowS
showList :: [MailAttachment] -> ShowS
Show)