Send an invoice by email

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Maxo42
Posts: 46
Joined: Sun Dec 04, 2022 11:13 pm

Send an invoice by email

Post by Maxo42 »

What is the syntax for the Rules action of a process that would send an email with an attachment with a document already created such as an invoice for example.
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Send an invoice by email

Post by hpl123 »

Henrik (V8 Developer Ed. - Windows)
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Send an invoice by email

Post by Jaymer »

On the one hand, sending Email in aware is easy/straightforward - Ask Vlad.

On the other hand, its complex with lots of twists and turns that you're no where ready to deal with as a newbie.

*) If a user is sending an email to a client, and it bounces, how will he ever know? It wasn't sent from his email account, but from a generic one setup in System Settings. Or if the customer replies, he will never see it.

*) And if it is sent from the generic account, then the client doesn't see it coming from "Max", only from the general account.

*) So then you have to investigate "replies-to"

*) But that has to be diff. for each user, so you have to have that in their User settings, to add to the email.

*) But users want it in their own "Sent Mail" folder, and it won't be if sent from the Generic acct. So a few years back he added "Outgoing Email Account". So you need to set these up and each user has to have their SMTP settings to its coming from their account (some email providers allow 'on behalf of' settings - this is another topic - but generally to prevent spoofing, you can't send from 1 account and say you're someone else).

*) k, if you get this far, you're going to want a "communications" history inside of aware (see CRM demo app) - so thats a physical file (lets call it OutgoingEmail) you CREATE with the TO address, subject, etc. You have to CREATE DOCUMENT the invoice and put it somewhere on the file system, because you need to IMPORT DOCUMENT into the Outgoing Email record you created.

*) THEN you can SEND OutgoingEmail to Contact USING OutgoingEmailAccount

UNLESS you are on UpCloud and you have to build a squirrelly Queue system because of a Java problem between Aware and Upcloud. (this is another few hours of work)

*) If you're doing emails now, and you want to allow a user to reset a password (or forgot password), thats a whole diff. topic because you need to build an encrypted link in the email to allow the user to see "Click here to be logged in", but one of the query parameters is the password, and you can't encrypt the users password if he enters it in the password field because it already encrypted, so when he enters his new password it has to be in a "dummy" field so you can grab it and build the login link (of course a few years ago we found out you can assign the Aware password field to that dummy field and internally it stores the encrypted version - cool, but nobody knew this) yada yada yada, blah blah blah... yes, it gets crazy. Like i said, another topic.

OK, good luck with emails... its Easy!!!
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Send an invoice by email

Post by Jaymer »

LOL
Oh yeah, right.
You def. need to figure out the whole "Store in FileSystem" stuff... which involves thinking about a hierarchy for documents (so all files don't just get chucked into one dir), checking for sub Directories and creating them if not found, and rules to calc the path, which hopefully you build using a new SystemSettings field like "BaseDocPath" instead of hardcoding it throughout the BSV.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Send an invoice by email

Post by aware_support »

Sending emails from Aware IM IS easy. It is well documented and there is a video tutorial about it as well. A LOT of applications are successfully using it.

To send an attachment just add an attribute of the Document type to the e-mail notification and initialize to the name of a document template. Or assign it by business rules.
Aware IM Support Team
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Send an invoice by email

Post by PointsWell »

Jaymer wrote: Thu Apr 20, 2023 7:32 pm On the one hand, sending Email in aware is easy/straightforward - Ask Vlad.

On the other hand, its complex with lots of twists and turns that you're no where ready to deal with as a newbie.
...
OK, good luck with emails... it's Easy!!!
This post contains some helpful comments despite its tone.

Here's the online How To help section on email.

Here is the video on how to send emails (if it doesn't show, make sure you have content blockers off).

Once you've got the basics of sending an email then there are some of the things that the post above touches on:
  1. What's the sending protocol for the app?
    1. Who should it be sent from? Does the recipient get an email marked "Do not reply to this email" in which case consider how you will set up the mailbox and whether it will just bounce the email or silently receive and delete.
    2. Is this an internal company app (which is more easily made specific) or one supplied as a service (in which case you need to manage the customisation of the communication and sender)?
  2. What will be the check for failed sends? You could have the app check its own inbox for failed send messages
  3. Are the emails being sent by the system or does an individual system user need to have copies of the emails? Can they be cc or bcc to the relevant system user?
Most of these are design issues that will surface as you go along, don't be put off by them.
Post Reply