Skip to content

Commit

Permalink
actually set Reply-To when sending emails
Browse files Browse the repository at this point in the history
  • Loading branch information
stepcut committed Dec 20, 2024
1 parent 336ec39 commit f4f874d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Happstack/Authenticate/Password/Handlers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import Happstack.Server
import HSP.JMacro
import Language.Javascript.JMacro
import Network.HTTP.Types (toQuery, renderQuery)
import Network.Mail.Mime (Address(..), Mail(..), simpleMail', renderMail', renderSendMail, renderSendMailCustom, sendmail)
import Network.Mail.Mime (Address(..), Mail(..), simpleMail', renderAddress, renderMail', renderSendMail, renderSendMailCustom, sendmail)
import System.FilePath (combine)
import qualified Text.Email.Validate as Email
import Text.Shakespeare.I18N (RenderMessage(..), Lang, mkMessageFor)
Expand Down Expand Up @@ -359,8 +359,8 @@ sendResetEmail mSendmailPath (Email toEm) (SimpleAddress fromNm (Email fromEm))
where
addReplyTo :: Maybe SimpleAddress -> Mail -> Mail
addReplyTo Nothing m = m
addReplyTo (Just (SimpleAddress rplyToNm rplyToEm)) m =
let m' = m { mailHeaders = (mailHeaders m) } in m'
addReplyTo (Just (SimpleAddress rplyToNm (Email rplyToEm))) m =
let m' = m { mailHeaders = (mailHeaders m) ++ [("reply-to", renderAddress (Address rplyToNm rplyToEm))] } in m'

passwordReset :: (Happstack m) =>
AcidState AuthenticateState
Expand Down

0 comments on commit f4f874d

Please sign in to comment.