Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xeaone/rust-sendmail
Rust sending emails via sendmail.
https://github.com/xeaone/rust-sendmail
Last synced: 2 days ago
JSON representation
Rust sending emails via sendmail.
- Host: GitHub
- URL: https://github.com/xeaone/rust-sendmail
- Owner: xeaone
- License: mit
- Created: 2015-07-21T23:07:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-10T16:42:41.000Z (over 6 years ago)
- Last Synced: 2024-11-12T08:00:07.924Z (2 days ago)
- Language: Rust
- Size: 1.17 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Rust Sendmail
Rust sending emails via sendmail.
This is the beginning stages of this repo and I am a Rust newbie. Please provide suggestions or corrections. Currently there is no working method (that I am aware of) to send emails with Rust. So I made rust-sendmail.
The requirements for Rust Sendmail:
- linux/unix machine
- sendmail installed
\* Note these instructions assume a Ubuntu machine
Step One
Install sendmail and configure
Run Commands:
```
apt-get install sendmail
nano /etc/hosts
```Edit: ```127.0.0.1 localhost localhost.localdomain HOSTNAME_IF_YOU_HAVE ONE```
Run Commands:
```
/etc/init.d/networking stop
/etc/init.d/networking start
```Run Command:
```
sendmailconfig
```
\* Y to everythingStep Two
Create Main.rs File
```
extern crate sendmail;
use sendmail::email;fn main() {
// Configure email body and header
email::create(
// From Address
"[email protected]",
// To Address
"[email protected]",
// Subject
"Subject - Hello World!",
// Body
"I am the body. Hello Wolrd!
"
And I accept html.
);// Define the actual email address to receive the email
email::send("[email protected]");
}
```