Send Email

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.


Download

SendEmail.zip


To run the sample

  1. Open the SendEmail solution with Linx Designer.
  2. Click on the Settings button.
  3. 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).
  4. Open the sample Process you want to run from the Solution Explorer pane on the left.
  5. 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:

  • SendEmailToMadridCustomers
    Retrieves Madrid customers and sends plain text email.
  • SendFancyEmailToCityCustomers
    Retrieves customers from the City provided as a parameter, formats an html email and sends it.
  • SendEmailAndNotifyStats
    Retrieves Madrid customers, sends plain text email and notifies you via email how many emails were sent.


Important

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.

  1. In your Gmail account:
    • Select Sign-in and Security
    • Switch off 2-Step verification
    • Scroll down and set “Allow less secure apps” to “On”
  2. In Linx, set the following SendEmail properties:
    • Enable SSL
    • Use Port 587
    • SMTP server: smtp.gmail.com


Video

Linx 5 SendEmail