Comments (6)
Could you try using an SMTP server from a different provider in order to figure out whether it's a Microsoft issue or something else?
from lettre.
I've just tested it with Gmail, same outcome.
from lettre.
Are you by any chance putting in the port number together with the hostname parameter of relay
?
from lettre.
You mean like "smtp.office365.com:587"? No, it's just "smtp.office365.com"
from lettre.
I am facing the same problem using AWS SES
Reference snippet:
// Build the message
let email = Message::builder()
.from(from_mailbox)
.to(to_mailbox)
.subject(subject)
.multipart(
MultiPart::alternative() // This is composed of two parts.
.singlepart(
SinglePart::builder()
.header(header::ContentType::TEXT_PLAIN)
.body(String::from(body_txt)), // Every message should have a plain text fallback.
)
.singlepart(
SinglePart::builder()
.header(header::ContentType::TEXT_HTML)
.body(String::from(body_html)),
),
)
.unwrap();
// Setup credentials
let creds = Credentials::new(SETTINGS.smtp_user.clone(), SETTINGS.smtp_password.clone());
// Open SMTP connection
let mailer = AsyncSmtpTransport::<Tokio1Executor>::relay(&SETTINGS.smtp_host)
.unwrap()
.credentials(creds)
.port(SETTINGS.smtp_port)
.build();
// Send the email
let send_result = mailer.send(email).await;
from lettre.
Solved (at least for my case): changed relay() to starttls_relay()
from lettre.
Related Issues (20)
- UnknownIssuer error after commit 69e5974 with rustls HOT 5
- Ahash Version HOT 6
- When sending file attachments via MultiPart I get the encoded message as text... HOT 1
- cyclic package dependency: package `ahash v0.8.6`
- AsyncTransport send() indefinitely waits for network up HOT 1
- RUSTSEC-2023-0071: Marvin Attack: potential key recovery through timing sidechannels
- Bug in DKIM body-hash computation with mimebodies
- PKCS#8 support for DKIM
- Please consider using `relaxed/relaxed` for default `DkimConfig` HOT 1
- Add multiple attachments to email message; accept Vec<SinglePart>
- The URL format for the SMTP transport doesn't decode the percent encoded username and password
- Can't send mail to mailhog HOT 2
- Remove transport traits
- Function to convert `transport::smtp::response::Code` to integer
- Improve `transport::smtp::Error` docs to clarify is_transient/is_permanent HOT 1
- Split `MessageBuilder::body` into `body` and `build`
- Invalid encoding for subject HOT 2
- Implement accept_invalid_hostnames for rustls
- support PGP HOT 2
- Expose the error kind of lettre::transport::smtp::Error in the public API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lettre.