send e-mail to multiple users
hi guys, new to ninox, i have a contact database with an e-mail filed for each customer. when i click the e-mail button i can send an e-mail to the designated indivual, but I would like to be able to manually select a few people to send the e-mail to at the same time- individually- ie not every contact in the same e-mail. can this be done? thank you
26 replies
-
I do not do much with email (yet)... so I am not sure if this is a Ninox Cloud only feature .. or if it would work locally.. here is a code snippet from the user manaual.. Just put this in a loop over selected contacts.
sendEmail({
from: "recipient@domain.com",
to: "recipient@domain.com",
subject: "Hello World!",
text: "Some text",
html: "<h1>Some Text</h1><i>With Markup</i>"
}) -
Per the manual
https://ninoxdb.de/en/manual/calculations/reference-of-functions-and-language
"Please note that the following functions do only work for Ninox Server and Cloud installations. They won’t return useful results for Ninox App."
-
Here's what you might end up with to loop through a Contacts table:
-
Sorry, screen shot hard to see so:
"-----------------------------------------------------------------------------------";
"This code selects contacts where a Yes/No field (Send Email) is set to yes";
"and loops through the records sending an email and re-setting the 'Send Email' flag";
"-----------------------------------------------------------------------------------";
for recipient in select Contacts where 'Send Email' do
sendEmail({
from: "julian@kirkness.com",
to: recipient.Email,
subject: "This is a test email",
text: " ",
html: "<h2>Test Email: " + recipient.Name + "</h2><br><br><i>Hopefully this shows the idea!!</i>"
});
recipient.('Send Email' := 0)
end -
hi julian thank you for the taking the time to reply to a noob. i am trying my best to understand, thank you for your patience. i have a problem, the code i you sent i am putting in the body of my EMAIL field
"-----------------------------------------------------------------------------------";
"This code selects contacts where a Yes/No field (Send Email) is set to yes";
"and loops through the records sending an email and re-setting the 'Send Email' flag";
"-----------------------------------------------------------------------------------";
for recipient in select MagnwallContactList where 'SendEmail' do
sendEmail({
from: "julian@kirkness.com",
to: recipient.Email,
subject: "This is a test email",
text: " ",
html: "<h2>Test Email: " + recipient.Name + "</h2><br><br><i>Hopefully this shows the idea!!</i>"
});
recipient.('Send Email' := 0)
end
I get an error file not found name at line 11 column 45, thanks for any help. willing to learn
-
Hi - do you have a field called Name inMagnWallContactList - if not that could be a place to start
-
yes, sorry, I changed all the errored fields to what they should be and received no errors afterwards.. but i'm not sure it is working..
I simply added a yes/no field SendEmail and changed it to check box
i then click the yes box in three different customer entries, clicked send email on the last customer i clicked yes on, and the email box popped up but only with the last customer's email in the to box.
sorry i realise i am a fish out of water here and probably need to do some basic studying of ninox. thank you for your help -
Ah - are you using the App?
sendEmail only works with the Cloud version so if you are on the app this won't work.
-
No I am actually using the web version
-
Just had a thought - I think you should put the code in a button rather than the email field.
-
hi, i have done as you instructed, then i select two customers and tick the yes box, click the sendemail button i created with the code inside, then i receive a message saying the email julian.ki etc etc is not registered with this team.
is there somethign i should modify in the code as regards to your email? an email box doesn't pop up, i just immediately recieve that error. maybe i'll add your email address and see what happens afterwards -
ah ok sorry problem was your email in the from field. fixed that. seemed to have fixed the problem now and i can send an email to all selected contacts perfectlecy, and they dont see each others addresses in the email
i guess my problem now is that for everytime i wish to change subject material of the email for different customers, i must manually go to the button field's code and input a different subject there?
or is there an easier way around that, for example, one selecting the targeted emails, another text box underneath to write an email subject that is linked? -
Glad it's now working!
Yes, what you've set up is a very simple case for sending a specific email to a list of people and then clearing them from the list.
With Ninox, it's quite possible to set up a sophisticated individual and/or bulk email system in which you could set up standard paragraphs, have embeddable variables in the text, store the sent emails as records against the person etc. This will resuire a table to hold the email types and a bit of code to manage the insertion of variable data, sending of the emails etc. This is a bit beyond the scope of a forum message - but I may consider writing a blog post about it (http://software.kirknessassociates.com/blog.html).
-
I've written a blog post about called Sending Bulk Emails in Ninox which you can see here:
http://software.kirknessassociates.com/blog_files/458b2ac56fab5fd7375f64b354486f37-38.html
The database used in the post is also available for free download from a link in the post.
-
Hi Julian, that is a great guide!
-
hi julian thanks for the guide. i donwnloaded and loaded to my ninox to play around with it
am i right in thinking for your 'contact' table i can use my own contact list? i need to play aroubnd
anyway what i want to ask is why in your database there is no send button on the mailouts? i see it in the guide but wanted to donwload yours and copy the code for the button... but there is no send button. thanks so much -
Ah - the send button hides itself if the mail out has been sent - delete the send date or create a new one and you’ll see it. Maybe I should add a mention of this in the blog post!
You should be able to apply the principles here to any database.
-
i've got everything working, when i click send to the 4 contacts i have selected, everything seems to work fine and it says the emails have been sent from my master email... but my contacts didn't recieve emails nor is there anything in my sent folder of my email
question, the FROM field, is my email, but i don't remember actully integrating this email on ninox so how can ninox access my email to send emails from it? i don't understabd.. grrrr -
am i missing something in the tooltip- before sending make sure the users selected have email addresses you can recieve? what does that mean>
-
ok sorry for more questions, solved all those, now my question is
when i create a contact list, for example, James, add it
then i click the magnifying glass to add a contact to it, it brings up the list of all my contacts
here i am only able to select one person at a time from the list, is it possible i am missing something? shouldn't i be able to highlight more than one contact to add to the list at the same time? -
i guess yes for now all i need to know is if i am able to slect more than one person from the contact list to add to the email list. that would make life a lot easier
thank you so much for this i feel i am understanding ninox a lot better -
No, you can only add one person at a time - you are actually creating a new record ech time you add a person to a mailing list (in the Contact Email Lists table). In this way you can have people in multiple mail lists. The way I visualised the use of this is that a Contact would be added to a mail list from the Contact record - and you can add as many as you like that way. If you want to be able to add from the Mail List then you should change the Composition field in the refence from Contact Email Lists to Contacts from Yes to No:
-
Thank you Julian. For future tefefence- could you recommend me how to go about getting a better understanding of the concepts and coding involved in ninox- from the ground up? Something to read. Or should I just play around in practice databases?
-
as you can see here, from the contacts field, the contact email lists i have saved don't show, i have to click on the + button then add it. guess it's not a problem but is that how you wanted it to work?
-
I hope you don't mind if I put my 2 cents in. It's not just practice, you should create experiment databases to test ideas that you can apply to your main database(s). The language reference is here...
https://ninoxdb.de/en/manual/calculations/reference-of-functions-and-language.
If you don't understand basic programming concepts you can choose any programming language, JavaScript is a possibility, but is more capable than Ninox's language, and find a tutorial or book to look at.
Content aside
- 5 yrs agoLast active
- 26Replies
- 9941Views