Closed her0mx closed 1 year ago
async_std::task::block_on(async move {
let email = SendableEmail::new(
Envelope::new(
Some(match EmailAddress::new(self.from.to_string()) {
Ok(email) => email,
Err(err) => {
eprintln!("the email have a error format {}: {:?}", self.from, err);
return;
}
}),
vec![EmailAddress::new(self.to.to_string()).unwrap()],
)
.unwrap(),
"id".to_string(),
"From: some@some.com\r\n\
Subjetc: Hola que tal como te va\r\n
Content-Type: text/plain\r\n\
\r\n\
Hello example".to_string().into_bytes()
i trie some like this but don't work! some@some.com is a example!
same issue.
@her0mx
There is a typo in your code.
Subjetc
-> Subject
I do this.
format!("Subject: {}\r\nContent-Type: text/plain\r\n\r\n{}", subject, body)
Library is not responsible for message construction. As answered already, the message needs a proper Subject:
header.
Hello I am trie to ad a title because i recived the next error message:
Could not send email: Err(Io(Custom { kind: Other, error: "incomplete" }))
thanks