Hi!How can I send an email to a list of people in a database??Thank you
Susana Nunes wrote:
Hi Susana, you can do a for each and send the email, check the pic bellow
here you are using an aggregate to get the information you need after you iterate by the position on the list and send the email using the current email
Check the oml attached Edit:(change the preparation to have an action to send the email)
Hope I could help you
Best regards
Carlos Lessa
Carlos Lessa wrote:
Susana, just changed the oml to not have on the preparation and send the email, now is in a button, anyway is just an example to use on your case
Cheers
Hello Susana.
That question is very broad.
There are a few steps you need to do.
1) configure OS to send email https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/Configure_OutSystems_to_Send_Emails
2) Create one email template https://success.outsystems.com/Documentation/11/Developing_an_Application/Implement_Application_Logic/Send_an_Email_From_a_Web_Application
3) Prepare your logic to loop a list of addresses and send one email to each one.
I'd advise you to follow the training to have a good idea of everything. If you have any specific doubt, please ask us.
Nuno Reis wrote:
I have a database with a list of students. And I want to send an email with information to all students in the database. I already configure OS to send email.
Thank you
So you are set to go.
Carlos' example (Query list of email, Loop and send email) is what you need to do. Just be careful about running it, because it sends the emails before opening the page.
In development servers you can set to send all emails to a single email address (as in, not the one read from database) to prevent mailing everyone by accident.Because I don't know if you did that, I did a small adjustment so you can list the people and after checking the addresses you send the emails.
I created a database with only one person (name and email). I created the button and the screen action. I can't receive the email! (SendEmail in attachment)Thank You
Hi Susana, did you configure the default Sender email and Sender name on Sevice Center?
Yes, I did
Can you check the log and see if there are errors in sending the email?
btw sometimes the email is not sent asap and it takes a little to arrive
If you didn't configure you should see an error like that in the service studio if you turn on the debug and add a breakpoint
Follow this link to know how to configure or how to turn on the Redirect to test list
https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/Configure_OutSystems_to_Send_Emails
Susana check if these configs are correct to your email
And I remember when I was doing a test while ago and I added in another OS account my Gmail, didn't work well, was necessary to change something on my setting of Gmail. check if isn't that your case
To complete Carlos' references:
Go to https://myaccount.google.com/
Choose Security (left menu)
Under the Start Session section, you have a two-step authentication entry that must be off.
The Portuguese version will be something like this.
[yourserver]/servicecenter/Email_Logs.aspx
Now sent with a looooong delay!! Thank you for the help :)
Good we could help you.
Now to help others with the same question as yours to find the proper answer to your post, mark as Solution the question that helps you most.