dongri / mailgun-rs Goto Github PK
View Code? Open in Web Editor NEWMailgun API for Rust
Home Page: https://crates.io/crates/mailgun-rs
License: MIT License
Mailgun API for Rust
Home Page: https://crates.io/crates/mailgun-rs
License: MIT License
Hi! I tried to send gmail-to-gmail email but got this on mailgun dashboard.
Unauthenticated email from google.com is not accepted due to domain's DMARC policy. Please contact the administrator of google.com domain if this was a legitimate mail. Please visit https://support.google.com/mail/answer/2451690 to learn about the DMARC initiative.
Any fix you can suggest?
Otherwise it's not particularly better, comparing to construct mailgun request with Command
substitution...
I've been having difficulty with posting to the API. It kept responding with a 'Forbidden' message, and nothing more. After some research, I discovered the reason: in my situation, the API endpoint should start with 'api.eu'.
NOTE: If you’re sending from our EU infrastructure, be sure to substitute the beginning of the endpoint “https://api.mailgun.net” with “https://api.eu.mailgun.net”
Hi, thanks for an awesome library first of. I tried setting it up, but I encounter some issues while using this with Rocket framework. I get this error:
thread 'rocket-worker-thread' panicked at 'Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.', /Users/marcus.cvjeticanin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.28.1/src/runtime/blocking/shutdown.rs:51:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This is my POST endpoint in Rocket that basically calls the function send_mail_confirmation()
that is basically the send_html()
function from your examples:
#[post("/order/save", format = "application/json", data = "<order>")]
pub fn save_order(order: Json<Order<'_>>) -> Json<MailConfirmation> {
// take the order and use the information to send an email
send_mail_confirmation(&order);
let confirmation = MailConfirmation {
message: "Mail sent successfully!",
};
Json(confirmation)
}
Hello there !
First of, thanks for this lib, it's very handy :)
I just created a PR #2 to bump reqwest
version.
Having old reqwest version is causing some versions clashes eventually in downstream apps / libraries.
Thanks again :)
Thanks for putting this together. The JS mailgun API allows you to specify a template
and custom variables that can be read within the mailgun template:
to: email,
subject: `Welcome to ${appName}`,
template: 'recovery',
'v:email': email,
Is it possible to do the same with this library? I don't see them in the Message
struct:
pub struct Message {
pub to: Vec<EmailAddress>,
pub cc: Vec<EmailAddress>,
pub bcc: Vec<EmailAddress>,
pub subject: String,
pub text: String,
pub html: String,
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.