Skip to content

Instantly share code, notes, and snippets.

case dict:find(send_welcome_email,UserParams) of
{ok, EmailType} ->
case Realm of
<<"cheetah">> ->
EmailParams = param_dict:from_proplist([{email, Email},{ firstname, FirstName},{lastname, LastName}]),
cheetah_sender_module:send_email(CallContext,EmailParams);
_ -> noop
end
_ -> noop
end,
from_proplist([ { Key, Value } | Tail ], Dict) ->
AtomisedKey = convert_to_atom( Key ),
NewDict = dict:store( AtomisedKey, inner_from_proplist(Value), Dict ),
from_proplist( Tail, NewDict ).