rustdesk-server-pro
rustdesk-server-pro copied to clipboard
SMTP Problem
Hello,
I'm on 1.1.10-3 and my email not send.... How change smtp settings or email without access on web console ? Maybe in sqlite ?
Thanks !
you can not access web console?
Access is ok ! But when it send 2FA Code via e-mail, i have no e-mail recieve.. So i would like to disable 2FA without acess to web console 😉
Not working for you?
I upgraded from version 1.1.9 to version 1.1.10-3. I had SMTP in the old version which worked well. Today, I no longer receive anything. I would like to deactivate 2FA without entering the WEB console. Can we do this via SQLite? or another solution?
We did have back compatibility test for this, but maybe we missed something.
Yes, please backup all db files first, db.sqlite3
and db.sqlite3-*
files first.
then you can run sqlite3 db.sqlite3
with below sql.
update user set info=json_remove(info, '$.email_verification') where name='test';
please change 'test' to your name.
But in the web console after you logged in, you will still see. You can tick it off and update.
@dignow this is what I worried most, back compatibility. FIX this ASAP. No matter what changes we do, this is the most important thing.
I'm failed to reproduce this issue.
- Delete current
db.sqlite3
. - Checkout
1.1.9
. - Create and migrate db.
- Run and configure SMTP settings, and "Enable email login verification".
- Checkout
1.1.10-3
. - Migrate db.
- Login.
I can receive the email after Step 7.
@Apashh Which type of email did you want to send?
Another user also reported this via [email protected]
I've tried 1.1.8 -> 1.1.10-3 and 1.1.9 -> 1.1.10-3. Sending email 2FA code works fine when login.
I guess they have different settings which we do not have in our test. Let's wait for their reply.
We did have back compatibility test for this, but maybe we missed something.
Yes, please backup all db files first,
db.sqlite3
anddb.sqlite3-*
files first. then you can runsqlite3 db.sqlite3
with below sql.update user set info=json_remove(info, '$.email_verification') where name='test';
please change 'test' to your name.But in the web console after you logged in, you will still see. You can tick it off and update.
I made the commands and accessed the console again but 2FA did not work. In the SMTP settings, I validate the settings (I use the same on other applications), the console tells me that everything is good, I enter an email address for tester but I receive nothing (even in spam) .
@Apashh Thanks for your feedback.
What's the test result message?
@Apashh Thanks for your feedback.
What's the test result message?
![]()
No message when click on submit and test :
Does ssl0.ovh.net
require payment? I'm failed to register the email.
But it's strange that there's no reply. Can you try a wrong password?
https://github.com/rustdesk/rustdesk-server-pro/assets/136106582/3989d272-7d61-45d5-9990-f607f5cc86d0
Est-ce
ssl0.ovh.net
qu'il faut payer ? Je n'ai pas réussi à enregistrer l'e-mail.Mais c'est étrange qu'il n'y ait pas de réponse. Pouvez-vous essayer un mauvais mot de passe ?
ase.mp4
I have an error :
But if password is good, no message appear and no message recieve in inbox
Have you input the receiver email here? If empty no test email will be sent, only updates will be made.
Have you input the receiver email here? If empty no test email will be sent, only updates will be made.
![]()
Yep the reciever its not empty :)
I'm not clear of what you said.
Do you mean the receiver email is not empty, you have set the receiver email and then click "OK"?
If so, can you please run a rust test? Sorry for the inconvenience, but I cannot find out the reason if the message is empty while the receiver email is set.
https://crates.io/crates/lettre
use lettre::message::header::ContentType;
use lettre::transport::smtp::authentication::Credentials;
use lettre::{Message, SmtpTransport, Transport};
fn main() {
let email = Message::builder()
.from("NoBody <[email protected]>".parse().unwrap())
.reply_to("Yuin <[email protected]>".parse().unwrap())
.to("Hei <[email protected]>".parse().unwrap())
.subject("Happy new year")
.header(ContentType::TEXT_PLAIN)
.body(String::from("Be happy!"))
.unwrap();
let creds = Credentials::new("smtp_username".to_owned(), "smtp_password".to_owned());
let mailer = SmtpTransport::starttls_relay("smtp.gmail.com")
.unwrap()
.credentials(creds)
.port(587)
.build();
match mailer.send(&email) {
Ok(r) => println!(
"Email sent successfully: {}, {:?}",
r.code(),
r.message().collect::<Vec<&str>>()
),
Err(e) => panic!("Could not send email: {:?}", e),
}
}
I'm not clear of what you said.
Do you mean the receiver email is not empty, you have set the receiver email and then click "OK"?
If so, can you please run a rust test? Sorry for the inconvenience, but I cannot find out the reason if the message is empty while the receiver email is set.
https://crates.io/crates/lettre
use lettre::message::header::ContentType; use lettre::transport::smtp::authentication::Credentials; use lettre::{Message, SmtpTransport, Transport}; fn main() { let email = Message::builder() .from("NoBody <[email protected]>".parse().unwrap()) .reply_to("Yuin <[email protected]>".parse().unwrap()) .to("Hei <[email protected]>".parse().unwrap()) .subject("Happy new year") .header(ContentType::TEXT_PLAIN) .body(String::from("Be happy!")) .unwrap(); let creds = Credentials::new("smtp_username".to_owned(), "smtp_password".to_owned()); let mailer = SmtpTransport::starttls_relay("smtp.gmail.com") .unwrap() .credentials(creds) .port(587) .build(); match mailer.send(&email) { Ok(r) => println!( "Email sent successfully: {}, {:?}", r.code(), r.message().collect::<Vec<&str>>() ), Err(e) => panic!("Could not send email: {:?}", e), } }
Yep I have set the reciever and click on OK but nothing ... How run rust test ?
What OS do you use? Can you run my executable file?
I've attached my files here. Please run in the terminal.
If you use linux or macos, please run chmod +x simple_test_<linux|macos>
first.
This test app uses native-tls
.
The test app in https://github.com/rustdesk/rustdesk-server-pro/issues/99#issuecomment-1775326168 uses tokio1-rustls-tls
.
What OS do you use? Can you run my executable file?
I've attached my files here. Please run in the terminal.
If you use linux or macos, please run
chmod +x simple_test_<linux|macos>
first.[simple_mail_test.zip](https://github.com/rustdesk/rustdesk-server-pro/files/12857272/simple_mail_test.zip)
Hello, i have test it and error :
How add option starttls or ssl option with port 587 or 465 ?
My command :
./simple_test_linux -f [email protected] -p Password -P 25/587/465 -s ssl0.ovh.net -t [email protected] -u [email protected]
Add -S
will set starttls
to be true.
The port is set by -P
.
./simple_test_linux -S -P 587 ...
Email recieve perfectly with same option of web console
Thanks. I need to double check the code.
Have you restarted the server, except for the upgrade?
Can you please try restart the server?
I find a problem that the same email configuration may not trigger the send actions (if initialization fails).
hbbr and hbbs restarted, smtp test and same, no mail, no message on webconsole...
Thanks @Apashh
Can you see that the update operation was successful?
@Apashh Can you please try again this test on your machine? Thanks.
Use https://github.com/rustdesk/rustdesk-server-pro/issues/99#issuecomment-1775326168 instead.