Sending Test Email Works, User registration email and password reset email don't

New user – running self hosted.

I have installed the system and it is working fine, so far. However, I cannot add users. I create an additional user and gave that user full admin rights, but that user never gets an email invite.

The “test email” page will send a test email successfully, but when inviting a user, they never get the email.

This bug has been around for at least two years, per the very few forum threads I can find:

https://www.invoiceninja.com/forums/topic/cant-activate-new-users/
https://www.invoiceninja.com/forums/topic/send-invitation-doesnt-send-any-emails-invoice-sending-works-fine/
https://www.invoiceninja.com/forums/topic/add-user-email-sending-question/

It’s very frustrating! I’ve done all of the troubleshooting – but can’t get at the info.

One thing I can do is inspect the mysql table and I see a pending confirmation token that could be used to validate my new user but I don’t know what that URL could be?

But getting back to the issue–it’s beyond clear that the code used on the page to define the email server (mailgun, smtp, mail, etc.) has a send test email button that uses different code to send email than the “Resend Invitation” button page. Why is this? And why can’t I just manually set a password for my new user and be done with it?

I appreciate your time. Any suggestions to help would be very welcome, as I’m about to abandon this software due to this.

App Version: v4.5.9
Server OS: Linux 4.10.0-28-generic

Forgot to mention: I even signed up for a mailgun account due to this…and the test email button goes through mailgun (it appears in their logs) but the invitation and password reset emails do NOT go through the mailgun account. How is this possible? I’m using the mailgun API and not SMTP.

@blkbm,

Have you setup DKIM and SPF records? If you can see it hitting mailgun, clearly Invoice Ninja is working and delivering the email to Mailgun, you’ll need to investigate the other side of this and not simply blame Invoice Ninja as it is impossible for Invoice Ninja to be responsible for end to end delivery of email. Thats just not the way the internet works.

@DavidBomba, Thank you for your response.

What is your explanation for the test email button on this page: /settings/system_settings going through mailgun but the resend invitation button /users/1/edit NOT going through mailgun? It literally makes no sense.

I am not ‘blaming’ invoice ninja for not ensuring that delivery of email goes through–I’m blaming it because the code used to send email is obviously different and there’s not a good way of troubleshooting it AND I can’t simply just reset my own password.

Please take this in the spirit in which it’s intended: a v2 rewrite from the ground up is happening right now, in your own words you can’t guarantee that email is always delivered, yet you give admins no other options than email for password resets and user registration. This needs to be improved.

@blkbm

If you have spent any time looking at the code, you can clearly see that both of those routes go to the same method which handles the sending of email.

There is no mystery here, there is clearly a configuration issue with your setup (have you checked the error logs for more information?) you also haven’t answered my previous question regarding SPF and DKIM configuration.

We send literally millions of emails using this exact code base every month, then add on the tens of thousands of self hosted users who also use it without this exact issue.

If you need configuration assistance we are happy to help, but you’ll need to excuse me if I am blunt because from the tone of your message simply blaming invoice ninja, threaten that you’ll ‘stop using’ the app and that we need to ‘do better’ is clearly not the best way to start a support query.

Again, I appreciate your response. I’m not sure why you’re so upset.

I’ve wasted time trying to get this to work – so I’m admittedly frustrated, and you haven’t answered my questions, instead you’re chiding me. So the same goes for you: how do you expect me to respond to being told what to do?

Again–the ‘blame’ here is that I can’t change the password from the GUI. If this one feature was implemented I could move on. I actually don’t want to use the system to send email–it’s not an important feature to me. What is important is that I have multiple users. But I can’t due to not being able to set a password from the GUI. That’s really what is frustrating to me. I’m being truthful–this is a showstopper for me because I can’t use the software due to not being able to do this. Imagine how many users don’t tell you that.

To answer your question: the logs say nothing.

Do you want to help me, or do you want to continue to chide me? I’m listening. Please give me instructions and I’ll troubleshoot this. The log files have not been helpful.

The system is designed to be used with a working email system.

If you want to bypass this, it is simple set the column confirmed to 1 in the users table, then you can create many users and they won’t have to confirm their account.

@DavidBomda : What would their password be?

@blkbm

The only workaround for this would be to copy the administrator password hash and insert this into the additional user.

You’d then be able to log into the users account and change their password to something else.

With these work arounds I’ve gotten my user in. Thank you David.

I’m a systems guy so I’m very curious about the test email always working and the other emails not. What’s the explanation? When I had things going through mailgun the test email showed up in the logs, but the other emails didn’t even make it to mailgun.

I turned on debug in the gui (and am impressed with laravel’s debug gui) and on the test email page, it shows that an email got sent, but on say the password recover page, invoiceninja says that the reset email was successfully sent, but laravel’s email panel shows nothing.

I’m sure there is some sort of configuration issue here, but what could it be and where do I look?

I’d double check the logs in storage/logs/*.log for errors, in particular looking for errors emitted by Swiftmailer.

I’d also be scanning through /var/log/syslog to see if there are any other clues

Created an Account, using this distortedly setup registration process, just so that I can say for Anonymous there that this DavidBomba is a f u c k e n piece of s h i t and I feel less intelligent for having to have read its little d I c k garble of bitterly inadequate vocabulary. I feel sorry for your mother for having had to bring you into this world and deal with the seed giver you call dad that has lead you to be the sorry stain you are.

I can see now why this dope ass app is so absolutely ignorant and completely idiotic in some points, because of team members like you. If you had any sense of logic you would have been capable of comprehending what was being asked and might have responded capably; but you didn’t did you, because you couldn’t.

Do yourself a favor and let your wife know that she should leave you for any of those side jobs she’s got, and if you have any daughters, I’d be happy to show them what a real daddy is.

Anonymous person, sorry you had to deal with this sorry excuse of a human being. I’d be happy to see him in real life and watch him change his tone :slight_smile: LoL
I’ve been having the same issue that you mentioned; exactly as you mentioned it. You made sense in your description. Don’t let the idiot morph your abilities by trying to comprehend the incomprehensible. Good luck to you and we all wish you well.

Note: I don’t know if this issue arrises when using invoiceninja servers, but it does with self hosted; and strangely enough, it does not if you install on a private server with a private address (something to do with server type?). Their documentation is not as helpful as they think, nonsensical at times; But it is curious that this simple function errors in different environments; and frustrating. Also, if you’ve used mailgun, and check the env file, you’ll notice that the mailgun info is there but there still shows option for smtp. I think this has something to do with why the scripting gets confused and only sends under certain circumstances? I dunno. whatever. Good luck to you. Keep up the good work.

1 Like

I’m having the same issue on self hosted. It shows successfully sending the test email, but I get nothing even though I am using the SENDMAIL option and the correct SMTP settings for Outlook365.

Your assistance will be appreciated.