generated from tpl/purs
fix: fuck
This commit is contained in:
parent
ef0191e573
commit
6c83726c53
@ -84,12 +84,12 @@ deliverableOnce :: Email -> ExceptT EmailError Aff Email
|
||||
deliverableOnce email' = do
|
||||
let email = Email.toString email'
|
||||
{ reachable, syntax, mx, smtp } <- lift $ Promise.toAffE $ checkEmailImpl email
|
||||
when (not reachable) $ throwError $ EmailUnreachable email'
|
||||
when (not syntax.valid) $ throwError $ EmailSyntaxInvalid email'
|
||||
when (not mx.valid) $ throwError $ EmailMXInvalid email'
|
||||
when (not smtp.valid) $ throwError $ EmailSMTPInvalid email'
|
||||
when (maybe true Array.null $ Nullable.toMaybe $ mx.mxRecords) $ throwError $ EmailMXNoRecords email'
|
||||
for_ (Nullable.toMaybe $ smtp.error) $ throwError <<< EmailSMTPError email'
|
||||
when (not reachable) $ throwError $ EmailUnreachable email'
|
||||
pure email'
|
||||
|
||||
deliverable :: Email -> ExceptT EmailError Aff Email
|
||||
|
Loading…
Reference in New Issue
Block a user