If you have some other mailserver available, a tool like nullmailer can be helpful. It is a minimal solution, accepting mails from the local system and delegating the delivery to some smarter mailserver. The Debian wiki explains how to set it up. Basically, install the package and write account data for the smarter mailserver into a configuration file.
The Debian postfix package comes with a good configuration assistant, which makes setting up a fully featured mail server quite easy. Again, see the Debian wiki, which also has details on all the bells and whistles you probably won't need.
Yes, I'm aware that you are using a Raspi. Guess which Linux distribution is the base for Raspbian a.k.a. Raspberry Pi OS.
Both nullmailer and postfix allow you to submit mails via SMTP, that's the traditional and cleanest way. Any "solution" that tries to automate interacting with some kind of webmailer will ultimately fail, simply because there is no standard, only guesswork. Postfix comes with a sendmail executable that emulates the original "sendmail" as much as needed to send mail. Nullmailer has nullmailer-inject, which is not as compatible, but accepts emails from STDIN like sendmail does, and accepts a few parameters like sendmail does.
Alexander
In reply to Re: getting SMTP capability working
by afoken
in thread getting SMTP capability working
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |