mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 19:08:26 +00:00
Prepare sending mail
This commit is contained in:
@ -42,8 +42,14 @@ type Msg
|
||||
| Send
|
||||
|
||||
|
||||
type alias MailInfo =
|
||||
{ conn : String
|
||||
, mail : SimpleMail
|
||||
}
|
||||
|
||||
|
||||
type FormAction
|
||||
= FormSend SimpleMail
|
||||
= FormSend MailInfo
|
||||
| FormCancel
|
||||
| FormNone
|
||||
|
||||
@ -132,14 +138,19 @@ update msg model =
|
||||
( model, FormCancel )
|
||||
|
||||
Send ->
|
||||
let
|
||||
rec =
|
||||
String.split "," model.receiver
|
||||
case ( model.formError, Comp.Dropdown.getSelected model.connectionModel ) of
|
||||
( Nothing, conn :: [] ) ->
|
||||
let
|
||||
rec =
|
||||
String.split "," model.receiver
|
||||
|
||||
sm =
|
||||
SimpleMail rec model.subject model.body model.attachAll []
|
||||
in
|
||||
( model, FormSend sm )
|
||||
sm =
|
||||
SimpleMail rec model.subject model.body model.attachAll []
|
||||
in
|
||||
( model, FormSend { conn = conn, mail = sm } )
|
||||
|
||||
_ ->
|
||||
( model, FormNone )
|
||||
|
||||
|
||||
isValid : Model -> Bool
|
||||
|
Reference in New Issue
Block a user