How to track emails better?

There are already some feature requests from myself and others surrounding how the system tracks emails but I am wondering others are doing to KNOW their emails are being sent from IN. I need to be able track what was sent and have confirmation of ANY email sent.

I’m using google smtp relay usually invoices will send with no problem, sometimes I have to resend due to 421 errors. Very often, quotes and statements will fail to send with 421 (more often than invoices for some reason).

I feel like sometimes “recent activity” isn’t showing all activity and I have to cobble together what emails sent and which did not between recent activity and system logs (system logs have no time stamp which is PITA…request in for that).

A weird thing I noticed this week was I tried to send a statement and the recent activity showed that it sent “invoice xxx” (which failed to send) however invoice xxx was an old and long since paid invoice for that client…but that’s not what I was sending at all, it was a statement so they could see their current credit.

I’ve seen the typical articles and yes my smtp settings are good, they do work. It seems that some types of emails out of IN have a higher probability of not going through but I’m not a dev and can’t dig into how they differ at all other than content.

I’m sending less than 15 emails per month so its not an over send issue on my part. 421 error is vague and google says its a service temporarily unavailable but when this occurs I can regularly send an invoice right after (or before) and it sends. I’ve seen other references where 421 could be the result spam/junk/suspicious emails as well. @david mentioned in one of my posts that IN does try to resend…but I’ve not seen that. Once I see the 421 error (within 1-3 minutes) there is no further attempt to send that I have seen and I am having to do it manually.

I’ve been researching this and trying to make sending mail more reliable for several months and just getting frustrated.

Hi,

@david are emails notifications sent for failed emails?

In another thread I had suggested adding a webhook for failed emails, it may help here as well.

Thanks for your reply as always hillel! I rambled a bit but you got my gist which is just some better insight. As another example. I just tried to send the mentioned client a statement again. Yesterday recent activity showed it was trying to send an old invoice which failed. Today, same action attempted to send statement but there is no entry in recent activity (not even showing an email was sent) but also no errors so far in the system logs. It has been about 15 minutes, typically when error occurs it is in a few minutes. So I am here assuming the email was sent and no issues this time? This is where I would like a bit more logging (preferably in the GUI) that I can quickly look and see what emails were initiated and what the result was. I assume in most cases, no errors means all good. Still odd that in recent activity some email actions are not even shown. -I am in the habit now of refreshing the web browser several times over a few minutes as well even logging out/in while I wait and see if any errors present themselves after each email action.

You might try Postmark, they have a couple more tools for tracking, and if you follow all their setup instructions deliverability is much higher, they can even track when the message was opened (varying accuracy depending on mail client pre-caching or scanning message urls), Invoice Ninja tracks when the View button is clicked, not when the email is opened. While it’s reporting is apart from Invoice Ninja, it is a helpful tool to give you reassurance-

Postmark does have webhook support, maybe a future update to IN will support pulling status from Postmark, or appending status to the IN System log.

Thanks I will take a look. Hoping invoiceninja team will implement some better logging. We are a small entity, and I’m self hosting behind cgnat So I do not use any of the client portal stuff and solely rely on emails getting sent when I expect them to.

Postmark was the best solution for me on self-hosted they take care of heavy lifting as far as spam rejections, google smtp was causing me trouble also.

But you could host client portal if you are tech savvy, assumption if you are self hosting, but this is possibly higher on the skill scale… you could setup a Letsencrypt ssl cert, and run a Cloudflare tunnel back to your instance, it wont care about the NAT, you set the tunnel to update a cloudflare hostname that is proxy’d. You can also use the cloudflare plugin for letsencrypt certbot to renew a cert not open to the internet on 80… using a cloudflare tunnel does essentially expose your IN server to the world on 443, same as port forwarding 80/443 on a normal router would, so I suggest putting it on a DMZ if possible.

Setup a tunnel managed by your IN instance:

Then for ssl cert on debian I did: apt install -y python3-cloudflare python3-certbot-dns-cloudflare python3-certbot-nginx

https://certbot-dns-cloudflare.readthedocs.io/en/stable/

Add Cloudflare API key to /root/.cloudflared/cfcredentials.ini

certbot certonly --dns-cloudflare --dns-cloudflare-credentials ~/.cloudflared/cfcredentials.ini -d invnin.mydomain.com

Assuming mydomain.com DNS is hosted on cloudflare dns… These cloudflare services are free, if your dns is not hosted there, just hunt down and register a cheap domain for as low as $9/yr to register depending on extension.

1 Like

On the email settings I have BCC to my main email (which is different than my billing email). I get a copy of all the emails and notifications sent from IN. So the billing email gets a copy and my main email gets a copy. I delete the extra copies as I go along in the process.

The worse that have happened is that customers copy goes sometimes to junk mail, or like this time the warning of the due payment will go to junk. When I see they haven’t paid or haven’t “viewed” the invoice, I nudge them through email or sms.

BCC wouldn’t really be helpful for client email delivery confirmation. You would still be assuming that because you received it, so did the client. I would like an actual log or status page (and maybe icons for invoices, quotes, etc) be based on an smtp connection status. The recent activity list doesn’t seem to be all that consistent and system logs don’t include a time stamp.

It would be great not have to rely on something external outside of IN. It might not be perfect but knowing the smtp connection was successful would be a pretty good indication of a succeeded send.

Ok, I get it. I told you because you ask “how do we know”, so that’s the only way for me to know that it’s SENDING, which I thought that’s what you meant. If it sent 2 emails, “makes sense” it’s sending. If someone’s server doesn’t receive it, you will get the bounce back notification (that’s how I know).

I’m more interested on the “open” feature, but nowadays with all the settings about privacy, that’s even harder to accomplish.

Also, you can check on your cPanel “Track Delivery”:

I don’t use cpanel. I self host in a docker environment in my home lab. Using google workspace smtp for relay. I’m more interested as I mentioned, in more detail from IN without having to look elsewhere. Even if it’s more verbose logging, changing elements of the UI based on email sending would just be a super cool but I realize more work than just increasing log details.