Open Bounderx opened 4 years ago
@Bounderx Your database url is not well-formed. It's supposed to look like:
DATABASE_URL=postgres://<postgres_username>:<postgres_password>@localhost/<database>
@ukchukx I just obscured the database, it works. it is probably a problem with 'lettre' ?
ubuntu@ubuntu:~/rust/projectx$ cargo build Compiling auth_service v0.1.0 (/home/ubuntu/rust/projectx) error[E0433]: failed to resolve: could not find
smtpin
lettre --> src/email_service.rs:7:3 | 7 | smtp::{ | ^^^^ could not find
smtpin
lettre`
error[E0432]: unresolved imports lettre::Email , lettre::SmtpClient , lettre::ClientSecurity , lettre::ClientTlsParameters , lettre::smtp
--> src/email_service.rs:2:3 |
2 | Email, | ^^^^^ no Email in the root
3 |
SmtpClient, | ^^^^^^^^^^ no SmtpClient in the root
4 |
ClientSecurity, | ^^^^^^^^^^^^^^ no ClientSecurity in the root
5 |
ClientTlsParameters, | ^^^^^^^^^^^^^^^^^^^ |
---|---|---|---|---|---|---|---|---|---|
no ClientTlsParameters in the root |
|||||||||
help: a similar name exists in the module: TlsParameters |
|||||||||
6 | Transport, | ||||||||
7 | smtp::{ | ||||||||
^^^^ could not find smtp in lettre |
error[E0433]: failed to resolve: use of undeclared type or module Mechanism
--> src/email_service.rs:53:57
|
53 | ... .authentication_mechanism(Mechanism::Login)
| ^^^^^^^^^ use of undeclared type or module Mechanism
error[E0433]: failed to resolve: use of undeclared type or module Credentials
--> src/email_service.rs:54:44
|
54 | ... .credentials(Credentials::new(vars::smtp_username(), vars::smtp_password()))
| ^^^^^^^^^^^ use of undeclared type or module Credentials
warning: unused import: Transport
--> src/email_service.rs:6:3 |
6 | Transport, | ^^^^^^^^^ |
---|
= note: #[warn(unused_imports)]
on by default
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try rustc --explain E0432
.
error: could not compile auth_service
.
`
@Bounderx It appears you need to download the lettre
dependency.
If the repo link does not work for you, you can switch to any appropriate Cargo version.
maybe you have an .env config for me, mine doesn't work.
BIND_ADDRESS=127.0.0.1:8088
DOMAIN=192.168.178.45 PORT=3000 HOST=http://localhost:3000 DOMAIN_URL=http://localhost:3000 SECRET_KEY=0123
enable/disable logging
RUST_LOG=
mail
SMTP_SENDER_NAME=test SMTP_USERNAME=myuser SMTP_PASSWORD=mypass SMTP_HOST=smtp.1und1.de SMTP_PORT=587 SMTP_SECURITY=tls