I am trying to write a scheduled job that will send out email with attachments after exporting a set of data from the database to a group of users. The job will be hosted on the server.
I need something that I can run on the server to send out emails. Currently, there is no mail server installed. I don't want to use SMTP because I don't want to store the password to my email account on there (I am not the only one accessing the server).
How else can I send out an email with attachment without using an SMTP account? I have seen some servers able to send out emails without a properly email address, like root@localhost or something like that. Is it possible and how can I set up something like that?
EDIT: I get this idea of sending an email without SMTP because in PHP, for instance, I can send out an email without SMTP. I can also have my own headers in the email to control how the address will look.