Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Mark Schmale
hi. does rust-smtp aim to support server and client side?
Alexis Mousset
Hi, it only aims to be a client for now.
Alexander Elias

Alexs-MBP:rust-nickel-mustache Alex$ cargo run
Updating git repository https://github.com/amousset/rust-smtp.git
Compiling smtp v0.0.12 (https://github.com/amousset/rust-smtp.git#0b185352)
/Users/Alex/.cargo/git/checkouts/rust-smtp-65a23a25db4b0233/master/src/lib.rs:141:1: 141:24 error: unstable feature
/Users/Alex/.cargo/git/checkouts/rust-smtp-65a23a25db4b0233/master/src/lib.rs:141 #![feature(buf_stream)]
note: this feature may not be used in the stable release channel
error: aborting due to previous error
Could not compile smtp.

Is this because of Rust 1.0.0?

Ty Coghlan
Hey, does lettre support building emails from plain text? I.e., I have a string that contains a MIME email, and want to create a lettre out of it, look at its subject, and then send it out
Ty Coghlan
@amousset ^
Alexis Mousset
Hi, it is not possible at the moment but you could probably use rust-email to parse it, and then create an email without using the builder, and directly provide the MimeMessage
Ty Coghlan
@amousset That worked. Only caveat is that I had to effectively duplicate the Email struct due to not being able to create one because of visibility issues, but that's not a big deal. Is creating an email from mime-encoded text something you'd want as a pull request? Something like EmailBuilder::parse_mime_text
Alexis Mousset
yes, that would be great
when do you think 0.7 will be released?
Alexis Mousset
It has just been released (and I will try to release more often from now).
Robert Cutajar
Hi, I'm trying tokio-proto to implement a basic SMTP server. I've got a nice model, SMTP command parser, SMTP reply writer and a scetch of the SMPT protocol codec. I'd appreciate some feedback. My focus is on SMTP relay server / MTA, not mail submission right now. https://github.com/brightopen/samotop Thanks
Christopher Kaag
I need to have attachments generated from strings, but https://github.com/lettre/lettre/blob/master/lettre_email/src/lib.rs#L279 is using only files on the filesystem. Is there an easy way to instead send strings as 'file' content instead?
Edward Knyshov
Hello. Trying to use lettre. I got mail server working, I'm sure I can connect to it on localhost:25. But when I attempt to connect using builder_unencrypted_localhost I get connection refused error. Why could this happen?
Alexis Mousset
Hello. Sorry, I missed Gitter notifications for quite some time
@n3phtys Not for now but it should be pretty easy to implement. I opened lettre/lettre#261.
Alexis Mousset
@edvorg You should enable logging (with env_logger) to get more information about what happens.
Sebastian Blei
Hello there. After updating dependencies, nom::simple_errors is not found anymore. Gist is here: https://gist.github.com/iamsebastian/b181e8a31a2e4798ab9eeee97f51819c
Sebastian Blei
@amousset Maybe you can say anything?
Alexis Mousset
Hello, this is strange, I can compile 0.8.2 using nom 3.2.1. Looks like it is trying to use nom 4.0 (in which simple_errors has been removed).
Sebastian Blei
Thanks for answering @amousset
I can also compile 0.8.2 when I switch into: /home/sblei/.cargo/registry/src/github.com-1ecc6299db9ec823/lettre-0.8.2/
But I don't get it, why I can't compile lettre=0.8.2 in my crate locally.
Sebastian Blei
Also if I throw away the whole cache, it does not get build anymore. I really don't get it.
~/Projects/macsi-rust-api develop*
❯ find ~ -name "nom-*" -type d
find: ‘/home/sblei/.dbus’: Permission denied

~/Projects/macsi-rust-api develop*
❯ RUST_BACKTRACE=full cargo run
   Compiling version_check v0.1.3
   Compiling winapi-build v0.1.1
   Compiling libc v0.2.42
   Compiling cc v1.0.3
   Compiling void v1.0.2
   Compiling lazy_static v0.2.8
   Compiling ucd-util v0.1.1
   Compiling regex v1.0.0
   Compiling glob v0.2.11
   Compiling typenum v1.10.0
   Compiling pkg-config v0.3.11
   Compiling utf8-ranges v1.0.0
   Compiling cfg-if v0.1.2
   Compiling unicode-xid v0.1.0
   Compiling gcc v0.3.53
   Compiling quick-error v1.2.1
   Compiling unicode-width v0.1.5
   Compiling winapi v0.2.8
   Compiling siphasher v0.2.2
   Compiling num-traits v0.1.40
   Compiling bindgen v0.37.0
   Compiling ansi_term v0.11.0
   Compiling regex-syntax v0.4.1
   Compiling bitflags v1.0.3
   Compiling termcolor v0.3.6
   Compiling unicode-xid v0.0.4
   Compiling matches v0.1.6
   Compiling strsim v0.7.0
   Compiling vec_map v0.8.1
   Compiling serde v1.0.66
   Compiling openssl v0.9.17
   Compiling peeking_take_while v0.1.2
   Compiling quote v0.3.15
   Compiling unicode-normalization v0.1.5
   Compiling lazy_static v1.0.1
   Compiling traitobject v0.1.0
   Compiling utf8-ranges v0.1.3
   Compiling regex-syntax v0.3.9
   Compiling percent-encoding v1.0.0
   Compiling bitflags v0.9.1
   Compiling encoding_index_tests v0.1.4
   Compiling byte-tools v0.2.0
   Compiling log v0.3.8
   Compiling safemem v0.2.0
   Compiling constant_time_eq v0.1.3
   Compiling byteorder v1.1.0
   Compiling arrayref v0.3.4
   Compiling foreign-types v0.2.0
   Compiling pq-sys v0.4.5
   Compiling dtoa v0.4.2
   Compiling rustc-serialize v0.3.24
   Compiling typeable v0.1.2
   Compiling bitflags v0.7.0
   Compiling language-tags v0.2.2
   Compiling itoa v0.3.3
   Compiling rustc-demangle v0.1.5
   Compiling httparse v1.2.3
   Compiling groupable v0.2.0
   Compiling hex v0.3.2
   Compiling bufstream v0.1.3
   Compiling openssl-probe v0.1.1
   Compiling modifier v0.1.0
   Compiling byteorder v0.5.3
   Compiling take_mut v0.1.3
   Compiling byteorder v0.4.2
   Compiling podio v0.1.5
   Compiling term v0.4.6
   Compiling hex v0.2.0
   Compiling pest v0.3.3
   Compiling slog v2.0.12
   Compiling either v1.1.0
   Compiling kernel32-sys v0.2.2
   Compiling unicase v1.4.2
   Compiling unicase v2.1.0
   Compiling email v0.0.19
   Compiling unreachable v1.0.0
   Compiling memchr v1.0.1
   Compiling memchr v2.0.1
   Compiling atty v0.2.10
   Compiling rand v0.3.16
   Compiling which v1.0.5
   Compiling memchr v0.1.11
   Compiling num_cpus v1.6.2
   Compiling time v0.1.38
   Compiling rand v0.4.2
   Compiling hostname v0.1.5
   Compiling isatty v0.1.3
   Compiling regex-syntax v0.6.1
   Compiling libloading v0.5.0
   Compiling miniz-sys v0.1.10
   Compiling bzip2-sys v0.1.6
   Compiling clang-sys v0.22.0
   Compiling log v0.4.2
   Compiling socket2 v0.2.2
   Compiling net2 v0.2.31
   Compiling humantime v1.1.1
   Compiling proc-macro2 v0.3.5
   Compiling textwrap v0.9.0
   Compiling num-integer v0.1.35
   Compiling openssl-sys v0.9.17
   Compiling libz-sys v1.0.16
   Compiling backtrace-sys v0.1.12
   Compiling rust-crypto v0.2.36
   Compiling curl-sys v0.3.14
   Compiling unicode-bidi v0.3.4
   Compiling synom v0.11.3
   Compiling unsafe-any v0.4.2
   Compiling encoding-index-korean v1.20141219.5
   Compiling encoding-index-singlebyte v1.20141219.5
   Compiling encoding-index-japanese v1.20141219.5
   Compiling encoding-index-tradchinese v1.20141219.5
   Compiling encoding-index-simpchinese v1.20141219.5
   Compiling mime v0.2.6
   Compiling block-buffer v0.3.3
   Compiling base64 v0.6.0
   Compiling base64 v0.9.2
   Compiling itertools v0.6.2
   Compiling mustache v0.8.1
   Compiling c
Sebastian Blei
I've also checked out dependency of lettre via git= flag, but no success.
If I use nom::simple_errors::* by myself, directly below use lettre... no import error get's thrown. But at lettre, it gets thrown. So ridiculous. Like black magic.
Sameer Puri
@amousset there is a PR to use nom 4.0, if you have some time could you take a look? lettre/lettre#307 thanks
I am new Rust. I tring to send a text email.

this ar my dependecies:
native-tls = "0.2.2"
lettre = "0.8"
lettre_email = "0.8"

This line give me error:
let mut tls_builder = TlsConnector::builder();

tls_builder.supported_protocols(&[Protocol::Tlsv10]).unwrap(); <--

error[E0599]: no method named supported_protocols found for type native_tls::TlsConnectorBuilder in the current scope
--> src\main.rs:31:17
31 | tls_builder.supported_protocols(&[Protocol::Tlsv10]).unwrap();

What is happening?

I need native-tls = "0.2.2" becouse i need some configuration that this version has
i was using lettre 0.7 for a mission critical project and it was working brilliantly. i needed to move to a new server so i am using a totally up to date and from scratch install of ubuntu 18.04 with stable rust using the same IP/DNS entry. because openssl 1.1.1 did not want to work with lettre 0.7 i am trying to switch my project to lettre 0.9.2, however now sending an email times out. i am using postmarkapp to send emails
using curl with the same service provider works fine, but when i send an email which is (as far as i can tell) the same as what i send with curl, it times out
Alexis Mousset
Could you log a mail transaction in debug (for example with env-logger, like in https://github.com/lettre/lettre/blob/master/lettre/examples/smtp.rs), to see which step timeouts?
i switched to a REST api interface to keep the system running, it was too urgent. i might be able to get back to you soon on this.