Skip to main content

email

Function email 

Source
pub const fn email(address: &str) -> Email<'_>
Expand description

Links to the e-mail address address; clicking it opens a new e-mail, with the headers (such as subject) filled in if set (D-213).

discord.js counterpart: email.

ยงExamples

use djs_formatters::email;

assert_eq!(email("help@example.com").to_string(), "<help@example.com>");
assert_eq!(
    email("help@example.com").headers(&[("Subject", "Bug report"), ("cc", "a@b.c")]).to_string(),
    "<help@example.com?subject=Bug+report&cc=a%40b.c>"
);