This sample sends emails with data retrieved from the Northwind database. You can get sample Northwind databases here.
This Linx Solution uses the Email and Database plugins.
To run the sample
- Open the SendEmail solution with Linx Designer.
- Click on the Settings button.
- On the Settings tab change the values of the Settings to suit your environment (if you need help with the database connection string, have a look at this help topic).
- Open the sample Process you want to run from the Solution Explorer pane on the left.
- Click the Debug or Run buttons to run the Process. For SendFancyEmailToCityCustomers you have to supply the City name as a parameter (bottom right in the debugger) or else nothing will be retrieved.
How it works
In this solution there are three Processes:
Retrieves Madrid customers and sends plain text email.
Retrieves customers from the City provided as a parameter, formats an html email and sends it.
Retrieves Madrid customers, sends plain text email and notifies you via email how many emails were sent.
Sending Email with Gmail:
For email providers using two-factor authentication (such as Gmail), you will need to complete additional steps to bypass further security settings.
- In your Gmail account:
- Select Sign-in and Security
- Switch off 2-Step verification
- Scroll down and set “Allow less secure apps” to “On”
- In Linx, set the following SendEmail properties:
- Enable SSL
- Use Port 587
- SMTP server: smtp.gmail.com