Mass email process

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Mass email process

Post by kklosson »

I want to select a number of peoples from a list and start a process to send them a mass email. I want to present a form to construct the email with a send button to send to all selected. So far, the only process that I can get to work is one where I have a preformed template and the template is sent to all selected. This is fine and useful and will be used for template-based messages. But I can't configure a process that works inline. Any thoughts?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Mass email process

Post by tford »

Any OutgoingEmail notification can be send to selected recipients. Simply populate the attributes of the notification with the values for the message you'd like them all to receive.
Tom - V8.8 build 3137 - MySql / PostGres
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Mass email process

Post by kklosson »

Thanks. The scenario I want is to start from a query, start a process applicable to multiple. Fill in a message form, press send. Obviously, I don't want to present the form for every instance of the object.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Mass email process

Post by tford »

When I do a Word merge or email, I insert the selected recipients info LoggedInRegularUser reference. Then you can iterate through them in a process which does the individual send.
Tom - V8.8 build 3137 - MySql / PostGres
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Mass email process

Post by tford »

In the case of a CRM system I wrote I also create a note of the correspondence sent in each recipients Notes attribute.
Tom - V8.8 build 3137 - MySql / PostGres
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Mass email process

Post by kklosson »

And how were the recipients selected... PICK FROM...?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Mass email process

Post by tford »

You could use a PICK FROM but in my case it is a process placed on the bottom of each query. The operation has "applicable to multiple items" checked. Checking records on the query, then clicking on the process pushes the checked records to the "selected prospects" reference of the LoggedInRegularUser.
Tom - V8.8 build 3137 - MySql / PostGres
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Mass email process

Post by kklosson »

I see. Innovative approach. many thanks.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Jaymer
Posts: 2457
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Mass email process

Post by Jaymer »

Tom
for clarification...

If you checked (and then recorded in the "om") 100 contacts, are there 100 separate emails being sent?
... or is something going on behind the scenes to send 1 email with multiple recipients?
Is Aware actually contacting the SMTP server 100 times? ... or just once?

I'd imagine under optimum conditions, it should send AT LEAST 1 email per second - but I've got that current issue where its 10sec / email. But if it only contacted it once, then that wouldn't be an issue.

thx
jaymer...
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
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Mass email process

Post by tford »

I use Mandrill transactional email tool by MailChimp. Emails go out VERY quickly.

My process involves:

1) Queries of the Student BO allow users to select multiple students to add to LoggedInRegularUser.StudentsMailMerge (this reference is used for both Word merge and email blast).

2) Email templates are built and stored in BO named Email_Outgoing_Templates_to_Students

3) Query shows all Email_Outgoing_Templates_to_Students instances and allows user to select one to send to all instances of Student in LoggedInRegularUser.StudentsMailMerge

4) Link on Query from #3 above runs process: Email_Selected_Students__1 (input to this process is an instance of Email_Outgoing_Templates_to_Students)

DISPLAY MESSAGE 'Sending email to selected students'
FIND Student WHERE Student IN LoggedInRegularUser.Students_MailMerge IN BATCHES OF 1
Email_Selected_Students__2

5) Process Email_Selected_Students__2 (inputs: Student and

If Student.Email_Combo_YN='Yes' Then
CREATE OutgoingEmail_Selected_Students WITH OutgoingEmail_Selected_Students.CC=Student.Email_Combo,
OutgoingEmail_Selected_Students.Attachment=Email_Outgoing_Templates_to_Students.Attachment,
OutgoingEmail_Selected_Students.Attachment_2=Email_Outgoing_Templates_to_Students.Attachment_2,
OutgoingEmail_Selected_Students.Attachment_3=Email_Outgoing_Templates_to_Students.Attachment_3,
OutgoingEmail_Selected_Students.Subject=Email_Outgoing_Templates_to_Students.Subject,
OutgoingEmail_Selected_Students.Message=Email_Outgoing_Templates_to_Students.HTML_Message
SEND OutgoingEmail_Selected_Students
CREATE Email_to_Student_Log WITH Email_to_Student_Log.Status='Sent',Email_to_Student_Log.Student=Student,Email_to_Student_Log.Subject=Email_Outgoing_Templates_to_Students.Subject


If Student.Email_Combo_YN='No' Then
CREATE Email_to_Student_Log WITH Email_to_Student_Log.Status='Not sent',Email_to_Student_Log.Student=Student,Email_to_Student_Log.Subject=Email_Outgoing_Templates_to_Students.Subject


Note that the 2nd line of this process is for instances of Student that do not have an email.

6) You notice some sloppy BO naming that's a bit confusing because only one email is sent at a time but a few of my BOs have plural names.
Tom - V8.8 build 3137 - MySql / PostGres
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Mass email process

Post by tford »

Code: Select all

f you checked (and then recorded in the "om") 100 contacts, are there 100 separate emails being sent?
... or is something going on behind the scenes to send 1 email with multiple recipients?
Is Aware actually contacting the SMTP server 100 times? ... or just once?
So as you can see from my description above, there would be 100 separate emails sent and AwareIM is contacting Mandrill 100 times.

In fact, if there were 100 Students in LoggedInRegularUser.StudentsMailMerge but let's say 5 of those students have two email addresses in Student.Email_Combo. Mandrill actually would send 105 emails.
Tom - V8.8 build 3137 - MySql / PostGres
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Mass email process

Post by BenHayat »

I had worked with another system that you would either select one or a few recipient, like outlook or you would first create a list/collection of recipients and attach the list to the email recipient section and send ONE email to as many people as they are in the list. That system used a secure way to pass the subject, email, recipient, CC and etc. as one package to some of the third parties in a REST format and they would then publish the emails. It was very fast to send the package. You could set the priority of high, normal or low to the email sender that would affect the cost and publishing speed.

Let's say you had to send 1000 invoices to 1000 users vs. 1 newsletter to 1000 users, the prices was a lot different. 1 newsletter to 1000 was much cheaper and it was a single email 1000 recipients. And by not using SMTP, the entire time all data (names, emails, subject, text) was encrypted and secured.

If this can be done via 8.1 REST service calling feature, it's best to do it via REST API with third party.
Jaymer
Posts: 2457
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Mass email process

Post by Jaymer »

Tom, thanks a lot for the detailed code - but I'm stuck at the beginning.

1) I created a new field: RegularUser.pm_Leads

2a) I have a Query with "multi allowed" and I can tags recs and click and the list gets built
2b) ANNOYING. Interesting that Tagging ALL only selected the ones on the current page. I know a user is going to Filter and find 80 Leads, and end up mailing to only 25.

3a) I have a "Show My List" button up there as well. Partly so one can view their list (to avoid problem in 2b) - AND I wanted to report how many are in the list.
3b) Since I'm doing a Query on Leads, I can't EDIT OBJECT of Regular User - np, I called a Process
3c) Find the LIRU. Update temp field in LIRU for LIST_SIZE, since LIST_SIZE doesn't work in a HTML cell
3d) EDIT RegUser using a form with the pm_Leads grid

4) There's nothing to prevent a Lead being added multiple times. True, he won't show up in the Grid more than once, but the count is off. Its possible to tag ONE Lead, and Add to List. Repeat. View List shows 1. Count says 2

5) I can delete entries one by one - but not in a process (This is where I'm really stuck). There needs to be a "Clear my List" function for the user - but I can't seem to make it happen.

Lots of ppl have had this Q/issue since you've been on the forum.
What am I missing?

thx
jaymer...

PS _ This is one problem that I've had with Aware managing many-to-many relationships in the past...
1) there's no browseable file you can manage in Aware (ie. the REF table isn't a real BO we can get to)
2) If you need another field describing that relationship (a effective date, status code, etc.) you have to make your own file anyway.
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
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Mass email process

Post by tford »

2b) ANNOYING. Interesting that Tagging ALL only selected the ones on the current page. I know a user is going to Filter and find 80 Leads, and end up mailing to only 25.
In some cases, I've built my own filters using LIRU attributes then the query using the LIRU filter values a FIND. You can then add two ways to select items from the filtered query:
1) Select individual lines in the query (or all of 1 page at a time) like a normal query.
2) Have a button that runs a process to find all items in the filtered query & add them to the selected items BO in LIRU.
3a) I have a "Show My List" button up there as well. Partly so one can view their list (to avoid problem in 2b) - AND I wanted to report how many are in the list.
Here is my process for adding instances of Student to LoggedInRegularUser.Students_MailMerge:
INSERT Student IN LoggedInRegularUser.Students_MailMerge
UPDATE LoggedInRegularUser
DISPLAY MESSAGE 'Students in merge list: '+LoggedInRegularUser.Students_MailMerge_Nbr

Note that there is a rule in RegularUser to keep Students_MailMerge_Nbr attribute up to date:
FIND Student WHERE Student IN RegularUser.Students_MailMerge
RegularUser.Students_MailMerge_Nbr=SEARCH_COUNT

This method of counting will always result in the correct number. Even if the user clicks on the same student multiple times to add to selected students, it will only be counted once.
5) I can delete entries one by one - but not in a process (This is where I'm really stuck). There needs to be a "Clear my List" function for the user - but I can't seem to make it happen.
Here is my process to clear the selected students:
UPDATE LoggedInRegularUser (this ensures the count which will be displayed is up to date)
DISPLAY QUESTION 'Are you sure you want to remove ALL '+LoggedInRegularUser.Students_MailMerge_Nbr+' selected students'
If Question.Reply='Yes' Then FIND Student WHERE Student IN LoggedInRegularUser.Students_MailMerge
If Question.Reply='Yes' Then REMOVE Student FROM LoggedInRegularUser.Students_MailMerge
If Question.Reply='No' Then DISPLAY MESSAGE 'Students NOT removed'
Tom - V8.8 build 3137 - MySql / PostGres
Jaymer
Posts: 2457
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Mass email process

Post by Jaymer »

Thanks Tom,
after going over this quite a lot, I decided to make my own many-to-many file.
i got more flexibility I think instead of letting AIM manage lists for me.
I'm doing my own middle file and no lists are involved.

For now, I'm limiting users to only one list - so while I can support many lists for a user, they have one "default" list created at login if it doesn't exist, and all "Add to list", "Remove from list" user functions all point to their internally-maintained "default" list. Takes a level of complexity out of it since many would have only one list. We may move to allow more in the future if users need it.
Anyway, List management is working, and a mass email thru Gmail API works great fine.

appreciate the help
jaymer...

PS _ I wrote a SP to remove the dups. I run that when my process "AddLeadsToList" finishes.
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
Post Reply