toastal / mailto

Elm mailto links made easy

Home Page:https://package.elm-lang.org/packages/toastal/mailto/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mailto

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

partnerMailto : Mailto
partnerMailto =
    mailto "partner@test.mail"
        |> subject "I want to cook you dinner"
        |> cc [ "cc@test.mail", "mutualfriend@test.mail" ]
        |> bcc [ "secretfriend@test.mail" ]
        |> 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:partner@test.mail?subject=I%20want%20to%20cook%20you%20dinner&cc=cc@test.mail,mutualfriend@test.mail&bcc=secretfriend@test.mail&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)

About

Elm mailto links made easy

https://package.elm-lang.org/packages/toastal/mailto/latest/

License:Apache License 2.0


Languages

Language:Elm 86.0%Language:Nix 14.0%