An email which can be sent over an SMTP server
Methods
Creates a new email which can be sent over Smtp.
Example
let email = exo::be::Email::new();
assert!(email is exo::be::Email);
Adds the sender of the email
Example
let email = exo::be::Email::new().from("system@exolynk.app");
assert_eq!(email.from, "system@exolynk.app");
Adds a receiver to the email
Example
let email = exo::be::Email::new().to("system@exolynk.app").to("no-replay@exolynk.app");
assert_eq!(email.to, ["system@exolynk.app", "no-replay@exolynk.app"]);
Adds a copy receiver to the email
Example
let email = exo::be::Email::new().cc("system@exolynk.app").cc("no-replay@exolynk.app");
assert_eq!(email.cc, ["system@exolynk.app", "no-replay@exolynk.app"]);
Adds a hidden receiver to the email
Example
let email = exo::be::Email::new().bcc("system@exolynk.app").bcc("no-replay@exolynk.app");
assert_eq!(email.bcc, ["system@exolynk.app", "no-replay@exolynk.app"]);
Adds the subject of the email
Example
let email = exo::be::Email::new().subject("Exolynk System Email");
assert_eq!(email.subject, "Exolynk System Email");
Sets the message of the email within a Exolynk styled html theme. This theme takes the email subject as a title.
Example
let email = exo::be::Email::new().body("This is a test message");
assert_eq!(email.body_plain, "This is a test message");
Sets the message of the email within a plain body.
Example
let email = exo::be::Email::new().body_plain("This is a test message");
assert_eq!(email.body_plain, "This is a test message");
Sets the message of the email within a Exolynk styled html theme.
Example
let email = exo::be::Email::new().body_html("Message", "<h1>Message</h1>");
assert_eq!(email.body_plain, "Message");
assert_eq!(email.body_html, "<h1>Message</h1>");
Protocols
let output = value.from
Allows a get operation to work.
value.from = input
Allows a set operation to work.
let output = value.to
Allows a get operation to work.
value.to = input
Allows a set operation to work.
let output = value.bcc
Allows a get operation to work.
value.bcc = input
Allows a set operation to work.
let output = value.cc
Allows a get operation to work.
value.cc = input
Allows a set operation to work.
let output = value.subject
Allows a get operation to work.
value.subject = input
Allows a set operation to work.
let output = value.body_plain
Allows a get operation to work.
value.body_plain = input
Allows a set operation to work.
let output = value.body_html
Allows a get operation to work.
value.body_html = input
Allows a set operation to work.