Easy to Create, Easy to Change - Easy to use!


Generate an email from a form


Started by Per Bruvold
Search
You will need to Sign In to be able to add or comment on the forum!

Generate an email from a form

Hi,

I use a DE8 to keep an overview of several projects. In my form i have among other fields a field for numbering the project, the project name, a date field and email address for the projectleader.

What I want to do; when the date in the date-field is passed the current date I want DE to generate an email to the projectleader. I want to use the projectnumber and project name as subject.. The text in the email is standard text for evrybody (no changing in text is necessary, it will be the same). Is it possible and if so how do I do it (give me a step-by-step description). Is it possible to make an command button to do this or preferably automatic.

Best regards Per Bruvold

Written by Per Bruvold 02/10/13 at 07:19:36 Dataease [{8}]FIVE

Re:Generate an email from a form

In DataEase 8 you have a new Email function called Send. It is based on the Blat Library for sending both simple and advanced emails (HMLT formatted with attachemnt/crypting etc).

You can read about it here:
http://www.dataease.com/dg3_HelpView/?PageID=13708

If you create a new app in DE8 from the default template you will get some default forms in your app.

System - Email Config is where you configure the SMTP server and you can also test your connection. The test email is the simplest way of using the Send function where you simply send everything in one string to the function.

As Send() is a function you can use it from anywhere in your app, so making a DQL (ExecDQL preferably, but you can also use a traditional Document DQL) you can simply run this DQL on startup every morning and the DQL will send a notification to all the project managers that is behind...

If you look at the CRM sample that is included with DE8, you will see that the first page loaded by users are Landingpage. This page configure the SMTP server for the active user and then move on to the Addressbook. You can do something similar to configure the SMTP connection and then run the DQL to send all the emails before proceeding with your normal business.

We will make a simpler example that show Send and emailing only, but at the moment we are a little pressed for time so hopefully this will get you started.

DE8 is now only one product in a big family of products that all support PRISM8 databases. Since DE8 is a client based product it is hard to set up schedules etc (you can however set up on DE8 on your server to be started on schedule with a command line that simply log in to your app and run the DQL that sends the emails) but DG3 is a proper client/server offering with both scheduling and emailing built in, so if the need for a more structured approach for automated emailing is needed, combining with a DG3 side of the app might be a good idea.

Written by DataEase 02/10/13 at 08:47:50 Dataease [{8}]FIVE