idea: Allow invoice sending
How big is this feature?
Medium
Describe the problem
- Allow the ability to send an invoice via email to a client
- allow CC of owner (copy)
- allow URL to manage
- allow note to client
Describe a possible solution
No response
Hello, I'd like to tackle this issue, is it still available?
Yeah sure thing @Domin1kG. Feel free to to checkout my responses to some other recent issues to get a few more details of what I'd expected when adding a feature.
Thanks!
Great, I'll check them and keep you informed on my progress and possible solutions, before I make any changes to the code.
Hello, I've looked through the files a bit and found some implementations for emails, mainly in the backend/core/ in api/emails, views/emails/ and types/. Also some email related line were found in the settings/helpers.py file, where the email service is setup. I also read the user guide about email variables and templates at https://docs.myfinances.cloud/user-guide/emails/templates/ I saw that when on the send invoice page, there already is a button to send via email, but the email feature is disabled. So I wanted to ask, if these functions are part of sending invoices, or something entirely different.
I also wanted to make sure I understood the problem correctly, so I need to make it possible to send the invoice via email as a PDF attachment? The URL to manage is meant something like when creating an invoice, so user fills out all information about the sender and recipient, chooses who to add to CC, etc.? And lastly, note to client means the ability to write the email body instead of using a template?
Sorry if I misunderstood something, I'd love to know your opinion, so we are on the same page.
I also had an error thrown with the AWS_ENABLE variable not being present while starting up the server, so I couldn't try the email function in the GUI, I'm not sure if I need to setup an access key in helpers.py file, or if something else is messing things up.
If perhaps I missed something, or some important files related to this issue, or have any suggestions of what I should look into, I'd be more than happy to know.
Hey @Domin1kG,
Thanks for taking an interest in this issue, much appreciated!
Just a quick question, do you have discord? If not that's no problem, i'll send a message below with answers to the questions :)
Hello, yes I do, I am the one who joined about an hour ago on your server, so feel free to DM me and thanks for the quick reply :)
We currently have two "email" features:
- Email sending: basically we call aws SES and send an email out, so this is the settings/helpers.py file, this is what's called from any backend thing, normally to inform OUR users.
- Emailing Feature: basically users of the app can send emails to THEIR customers. Bulk emailing is also possible.
The new feature for this issue was to merge this emailing with Invoices. Basically so we can email OUR users and THEIR users when actions are done, e.g. an invoice was created, an invoice was marked as over due.
I also wanted to make sure I understood the problem correctly, so I need to make it possible to send the invoice via email as a PDF attachment?
We currently don't do any PDF generation on the backend as the implementation proved to be difficult. Me and domejko spent quite a few hours attempting but ended up dropping it and let browsers handle it, so no we cannot attach them. The alternative is adding a link to the invoice (no login required) and then the users opening the email can go onto the link and press "print" and the browser will let them print/save as pdf.
The URL to manage is meant something like when creating an invoice, so user fills out all information about the sender and recipient, chooses who to add to CC, etc.?
Not 100% sure what you mean with this, but yeah this feature should be a modal that pops up giving the user the chance to input a subject, email body, TO address, CC and BCC.
Some limits should be made, but also be configurable as some enterprise may need different limits.
Sorry if I misunderstood something, I'd love to know your opinion, so we are on the same page.
Of course no problem, thank you for asking!
I also had an error thrown with the AWS_ENABLE variable not being present while starting up the server, so I couldn't try the email function in the GUI, I'm not sure if I need to setup an access key in helpers.py file, or if something else is messing things up.
Yeah, the AWS setup is a MESS right now. As it's currently really just made for me as i'm running it in production but some of it isn't open source. The variables you currently need are just the ENABLED ones like you say, and then it takes the AWS Keys + Permissions from your AWS CLI settings, DM me if you'd like more clarity around this :)
Great, thank you very much, I'll think through how could this be implemented and let you know beforehand. I'll also try to work out the AWS, so I can see the and current layout for emails and think of how it can be altered to suit the needs for this issue. If I run into a problem I can't deal with, can I contact you through your discord account, so I don't make this issue too long?
Of course no problem.
Also for emails, you don't actually need to have them setup. If there is no email setup in the environment variables then it just prints them to the console.
So if you just turn off all AWS flags/variables then you should be good to go.