Empty system logs

@link470

in your .env file set

MAIL_MAILER=log

also, just make sure all these fields are filled in (with dummy data), this will prevent any errors from triggering the system logs.

MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME="your_email_address@gmail.com"
MAIL_PASSWORD="your_password_dont_forget_the_quotes!"
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="your_email_address@gmail.com"
MAIL_FROM_NAME="Full Name With Double Quotes"

Thanks @david . I checked the system_logs table in the database and I see two errors logged at a time:

event_id: 61
type_id: 800
log: "{\"ip\":\"<IPAddress>\"}"

event_id: 30
type_id: 303
log: "An email must have a \"From\" or a \"Sender\" header."

These are the same errors each time, although the IP address is sometimes different. Now, if I add dummy data, such as:

MAIL_MAILER="log"
MAIL_HOST="mail.example.com"
MAIL_PORT="50000"
MAIL_USERNAME="example"
MAIL_PASSWORD="example"
MAIL_ENCRYPTION="tls"
MAIL_FROM_ADDRESS="example@example.com"
MAIL_FROM_NAME="example"

aren’t I just going to get errors like remi was having above where the SMTP authentication won’t be correct? Or will Invoice Ninja not even attempt to send anything out automatically if there’s data in those values? It just seems odd to me that the system_logs table itself doesn’t show any reference to the first client in my database, where as all of the System Log entries in the GUI mention this client.

The system logs are only for “system” events, like success/failures with third party API and mail servers etc etc.

When configuring the mailer to LOG, is just dumps the emails into the log file. However if the mail configuration is not “valid”, you’ll still see the errors in the system logs.

I see. The part that still doesn’t make any sense to me is how the error log in the database doesn’t mention client ID 1’s name at all, but in the GUI, this client’s name is on every error (behind the black box in my screenshot above). This client is 100% not interacting with anything, and I don’t use the client portal. What’s happening?

@link470

The client ID in the system log indicates the client that was effected by the actions taken, it allow you to fillter the system logs by client actions.