Can't send emails over VPS

I use the lettre crate under the Rust programming language to send emails programmatically to new potential users to verify their email during account creation. When I run the program with my own computer it works flawlessly and properly sends an email out but when I try it with my VPS the code runs and finishes without showing any errors but doesn't send the email. I already talked with the people at Linode to allow outbound connections at port 25, 465, and 587 as well as allow the said ports with firewall so I know that's not the issue (I even turned off the firewall and ran the program but the email never gets sent). Why can't I send emails over my VPS? If you'd like to recreate what's happening on your computer simply install Rust and then get the proper code from https://github.com/CrimsonTide0/Email or just run the command: "git clone https://github.com/CrimsonTide0/Email" then cd into with "cd Email/src" and then "nano main.rs" then replace email with the email that's going to send the message, password with the associated password, and recipient_email with the email that's going to receive the message. Then run the program with "cargo run" You'll likely find that this works on your computer as well but on Linode it doesn't for some reason. Thanks in advance!

1 Reply

@CrimsonTide0 I'm sorry that you're having trouble sending mail with with lettre crate and Rust. There aren't any restrictions on Linode's end that would prevent you from being able to send emails, if you've already had the new account restrictions removed. That being said, it may be helpful to reach out to the Rust and community and review the lettre documentation to see if they are able to provide you with more details. These community members are users of these services and have first hand experience with common issues that may arise.

It may also be helpful to check the logs of the mail server application you are using on your Linode. The location of the logs will depend on the service you are using.

I hope this has been helpful, and feel free to reply with the output of any error messages you receive during your investigation. The link below provides some really useful things to keep in mind when asking any community for troubleshooting help.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct