Skip to content

toastal/mailto

Repository files navigation

mailto

A piped DSL for creating mailto: links. See more at rfc6068.

partnerMailto : Mailto
partnerMailto =
    mailto "[email protected]"
        |> subject "I want to cook you dinner"
        |> cc [ "[email protected]", "[email protected]" ]
        |> bcc [ "[email protected]" ]
        |> body "I’ll be making a spicy, Isaan nam dtok muu salad (น้ำตกหมู)."

view : Html msg
view =
    a
        [ toHref partnerMailto ]
        [ text "🐷🌶️🥬🍚" ]

Which will output

<a href="mailto:[email protected]?subject=I%20want%20to%20cook%20you%20dinner&[email protected],[email protected]&[email protected]&body=I%E2%80%99ll%20be%20making%20a%20spicy,%20Isaan%20nam%20dtok%20muu%20salad%20(%E0%B8%99%E0%B9%89%E0%B8%B3%E0%B8%95%E0%B8%81%E0%B8%AB%E0%B8%A1%E0%B8%B9).">"🐷🌶️🥬🍚</a>

Project & Community Notes

This project is regrettably available on GitHub. The Elm community has tied itself to the closed-source, Microsoft-owned code forge of GitHub for package registry and identity. This does not protect the privacy or freedom of its community members.


License

This project is licensed under Apache License 2.0 - LICENSE file for details.

Funding

If you want to make a small contribution to the maintanence of this & other projects

  • Liberapay
  • Bitcoin: 39nLVxrXPnD772dEqWFwfZZbfTv5BvV89y (verified on Keybase)
  • Zcash: t1a9pD1D2SDTTd7dbc15KnKsyYXtGcjHuZZ (verified on Keybase)