NetTalk Central

Author Topic: How to send emails automatically  (Read 3305 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 381
    • View Profile
    • Email
How to send emails automatically
« on: November 18, 2016, 12:48:22 AM »
Hi,
Im wanting to conditionally send emails automatically from a nettalk app
Ive chosen to use  the example " Test email send control template"
Works  manually using globals to load the "ToEmail"and"Message" fields

What do I do please to
1.hide the window
2.auto push the send button?

Ive tried ?sendemail{prop:touched} = true
either this doesnt work or Im putting it in the wrong embed.

Thanks
Richard NT 8.71




peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: How to send emails automatically
« Reply #1 on: November 18, 2016, 01:01:49 AM »
Hi Richard,

Add the following immediately after opening the window:

Code: [Select]
0{prop:hide} = true
post(event:accepted,?EmailSend)

Peter

Richard I

  • Sr. Member
  • ****
  • Posts: 381
    • View Profile
    • Email
Re: How to send emails automatically
« Reply #2 on: November 19, 2016, 05:30:55 PM »
Thanks Peter,
Got that sorted, but as you will see in my later post, Im running into strife trying to send the same email message to conditionally many recipients.

it seems under test to overwrite the email address in the Queue with the latest
ie
If I send an email to one , all good
if I send  to four  recipients  each with different email addresses- then 4 emails are sent but all to the last in the table browse, given that I am looping through a browse and passing the detail..
not sure on this at all and would appreciate some help.
I suppose the option would be to actually close the template between emails?
Not sure about that either.....

Cheers
Richard


peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: How to send emails automatically
« Reply #3 on: November 21, 2016, 08:19:28 AM »
Hi Richard,
Not sure how your code is organized. In a similar situation I had the loop in one procedure and made a call to the sendmail proc from inside the loop. Of course this approach requires appropriate info to be passed on to the sendmail proc.

Peter