Re: [WebDNA] Multiple e-mail sending

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107715
interpreted = N
texte = This is a multi-part message in MIME format. --------------060009080802090303000608 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Marc, wow that example is comprehensive. But not quite what I was looking for, but I realize that it is my fault for not being explicit enough in what I was looking for, my apologies. I dont have access to the webserver at the moment but would something like this not work. - Mixture of pseudo and webdna code [text]sql_statement= select * from clients where [conditions][/text] [sql execute sql_statement] [founditems] Output row for 1 client [!]output a single clients information - so the user can view the results] [Append db=emails.db]*email=[db_email]*[/Append] [!]Add the email of a client to the db. emails.db[/!] [/founditems] [/sql] for each item in email.db send mail Now, my problem is not knowing how to just loop through to the db, because I've only added emails that need to be sent an email anyway then I dont need to search, just list them all. And, finally delete the db afterwards, so the same emails are not in the db next time the script is loaded, basically, everytime this file is loaded, i want to clean that db to make sure that the users is not sending out emails to someone wh ois not suposed to get any emails. I should have made this clear in my original post. Thanks for the feedback so far. On 17-11-2011 19:44, Marc Thompson wrote: > Tommy, > I've attached a small .tpl file I use for what you want. > It should give you a good starting point... > > Marc > > On 11/17/2011 11:19 AM, tommy@enkelthed.dk wrote: >> Hello >> >> I've got a query that will supply me with a table of customers that I >> display on the webpage, >> >> once the user has confirmed the list, I want to be able to click a >> button >> and send the same email to each of these customers, informing them that >> their products are ready for them to pickup. >> >> Now I can send a single email by hardcoding the email into the sendmail >> code, but I'd like to be able to send one for each of these customers. >> >> Any ideas? >> >> I've tried with >> >> >> [showif [butik]=store1] >> [arrayset name=clients_email&dim=1] >> (1)=[email] >> [/arrayset] >> >> >> [/showif] >> but it only persists until the template is reloaded, which means it >> won't >> be fed to the form when i click sendmail >> >> Im all out of idea's, I dont want to have to make another call to the DB >> as I think the call that provides the table in the first place should be >> enough to somehow store this information until i hit the send button. >> >> I was considering saving it in a flatfile db, of the internal webdna >> kind, >> but i've never worked with those - and I havent got a clue on what to do >> about it. >> >> Its late i've had a long day, if anyone can offer some advice on what I >> atleast could try I would be grateful. >> >> Regards >> Tommy >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list. >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us > --------------060009080802090303000608 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Marc, wow that example is comprehensive. But not quite what I was looking for, but I realize that it is my fault for not being explicit enough in what I was looking for, my apologies.

I dont have access to the webserver at the moment but would something like this not work. - Mixture of pseudo and webdna code


[text]sql_statement=3D select * from clients where [conditions][/text= ]

[sql execute sql_statement]
<table>

[founditems]
Output row for 1 client [!]output a single clients information - so the user can view the results]
[Append db=3Demails.db]email=3D= [db_email][/Append] [!]Add the email of a client to the db. emails.db[/!]
[/founditems]
[/sql]

for each item in email.db
=C2=A0=C2=A0=C2=A0 send mail



Now, my problem is not knowing how to just loop through to the db, because I've only added emails that need to be sent an email anyway then I dont need to search, just list them all.

And, finally delete the db afterwards, so the same emails are not in the db next time the script is loaded, basically, everytime this file is loaded, i want to clean that db to make sure that the users is not sending out emails to someone wh ois not suposed to get any emails.

I should have made this clear in my original post.

Thanks for the feedback so far.


On 17-11-2011 19:44, Marc Thompson wrote:
Tommy,
I've attached a small .tpl file I use for what you want.
It should give you a good starting point...

Marc

On 11/17/2011 11:19 AM, tommy@enkelthed.dk wrote:
Hello

I've got a query that will supply me with a table of customers that I
display on the webpage,

once the user has confirmed the list, I want to be able to click a button
and send the same email to each of these customers, informing them that
their products are ready for them to pickup.

Now I can send a single email by hardcoding the email into the sendmail
code, but I'd like to be able to send one for each of these customers.

Any ideas?

I've tried with


[showif [butik]=3Dstore1]
[arrayset name=3Dclients_email&dim=3D1]
(1)=3D[email]
[/arrayset]


[/showif]
but it only persists until the template is reloaded, which means it won't
be fed to the form when i click sendmail

Im all out of idea's, I dont want to have to make another call to the DB
as I think the call that provides the table in the first place should be
enough to somehow store this information until i hit the send button.

I was considering saving it in a flatfile db, of the internal webdna kind,
but i've never worked with those - and I havent got a clue on what to do
about it.

Its late i've had a long day, if anyone can offer some advice on what I
atleast could try I would be grateful.

Regards
Tommy
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list<talk@webdna.us>.
To unsubscribe, E-mail to:<talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us<= /a>
Bug Reporting:
support@webdna.us


--------------060009080802090303000608-- Associated Messages, from the most recent to the oldest:

    
  1. [BULK] Re: [WebDNA] Multiple e-mail sending (Tommy Bell 2011)
  2. Re: [WebDNA] Multiple e-mail sending (Tommy Bell 2011)
  3. Re: [WebDNA] Multiple e-mail sending (Marc Thompson 2011)
  4. Re: [WebDNA] Multiple e-mail sending (Dan Strong 2011)
  5. [WebDNA] Multiple e-mail sending ( 2011)
This is a multi-part message in MIME format. --------------060009080802090303000608 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Marc, wow that example is comprehensive. But not quite what I was looking for, but I realize that it is my fault for not being explicit enough in what I was looking for, my apologies. I dont have access to the webserver at the moment but would something like this not work. - Mixture of pseudo and webdna code [text]sql_statement= select * from clients where [conditions][/text] [sql execute sql_statement] [founditems] Output row for 1 client [!]output a single clients information - so the user can view the results] [Append db=emails.db]*email=[db_email]*[/Append] [!]Add the email of a client to the db. emails.db[/!] [/founditems] [/sql] for each item in email.db send mail Now, my problem is not knowing how to just loop through to the db, because I've only added emails that need to be sent an email anyway then I dont need to search, just list them all. And, finally delete the db afterwards, so the same emails are not in the db next time the script is loaded, basically, everytime this file is loaded, i want to clean that db to make sure that the users is not sending out emails to someone wh ois not suposed to get any emails. I should have made this clear in my original post. Thanks for the feedback so far. On 17-11-2011 19:44, Marc Thompson wrote: > Tommy, > I've attached a small .tpl file I use for what you want. > It should give you a good starting point... > > Marc > > On 11/17/2011 11:19 AM, tommy@enkelthed.dk wrote: >> Hello >> >> I've got a query that will supply me with a table of customers that I >> display on the webpage, >> >> once the user has confirmed the list, I want to be able to click a >> button >> and send the same email to each of these customers, informing them that >> their products are ready for them to pickup. >> >> Now I can send a single email by hardcoding the email into the sendmail >> code, but I'd like to be able to send one for each of these customers. >> >> Any ideas? >> >> I've tried with >> >> >> [showif [butik]=store1] >> [arrayset name=clients_email&dim=1] >> (1)=[email] >> [/arrayset] >> >> >> [/showif] >> but it only persists until the template is reloaded, which means it >> won't >> be fed to the form when i click sendmail >> >> Im all out of idea's, I dont want to have to make another call to the DB >> as I think the call that provides the table in the first place should be >> enough to somehow store this information until i hit the send button. >> >> I was considering saving it in a flatfile db, of the internal webdna >> kind, >> but i've never worked with those - and I havent got a clue on what to do >> about it. >> >> Its late i've had a long day, if anyone can offer some advice on what I >> atleast could try I would be grateful. >> >> Regards >> Tommy >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list. >> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us >> Bug Reporting: support@webdna.us > --------------060009080802090303000608 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Marc, wow that example is comprehensive. But not quite what I was looking for, but I realize that it is my fault for not being explicit enough in what I was looking for, my apologies.

I dont have access to the webserver at the moment but would something like this not work. - Mixture of pseudo and webdna code


[text]sql_statement=3D select * from clients where [conditions][/text= ]

[sql execute sql_statement]
<table>

[founditems]
Output row for 1 client [!]output a single clients information - so the user can view the results]
[Append db=3Demails.db]email=3D= [db_email][/Append] [!]Add the email of a client to the db. emails.db[/!]
[/founditems]
[/sql]

for each item in email.db
=C2=A0=C2=A0=C2=A0 send mail



Now, my problem is not knowing how to just loop through to the db, because I've only added emails that need to be sent an email anyway then I dont need to search, just list them all.

And, finally delete the db afterwards, so the same emails are not in the db next time the script is loaded, basically, everytime this file is loaded, i want to clean that db to make sure that the users is not sending out emails to someone wh ois not suposed to get any emails.

I should have made this clear in my original post.

Thanks for the feedback so far.


On 17-11-2011 19:44, Marc Thompson wrote:
Tommy,
I've attached a small .tpl file I use for what you want.
It should give you a good starting point...

Marc

On 11/17/2011 11:19 AM, tommy@enkelthed.dk wrote:
Hello

I've got a query that will supply me with a table of customers that I
display on the webpage,

once the user has confirmed the list, I want to be able to click a button
and send the same email to each of these customers, informing them that
their products are ready for them to pickup.

Now I can send a single email by hardcoding the email into the sendmail
code, but I'd like to be able to send one for each of these customers.

Any ideas?

I've tried with


[showif [butik]=3Dstore1]
[arrayset name=3Dclients_email&dim=3D1]
(1)=3D[email]
[/arrayset]


[/showif]
but it only persists until the template is reloaded, which means it won't
be fed to the form when i click sendmail

Im all out of idea's, I dont want to have to make another call to the DB
as I think the call that provides the table in the first place should be
enough to somehow store this information until i hit the send button.

I was considering saving it in a flatfile db, of the internal webdna kind,
but i've never worked with those - and I havent got a clue on what to do
about it.

Its late i've had a long day, if anyone can offer some advice on what I
atleast could try I would be grateful.

Regards
Tommy
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list<talk@webdna.us>.
To unsubscribe, E-mail to:<talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us<= /a>
Bug Reporting:
support@webdna.us


--------------060009080802090303000608-- Tommy Bell

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

form crasehes server (1997) [WebDNA] How to Grab link (2014) How To question on setting up downloads (1997) how do I have html files routed through webcat on OSX? (2001) textA (1998) is there a global includes directory? (1998) WebCatalog as a ListServ (1998) [Sum] function? (1997) Close-to Comparison Code (1998) Goofy Date Sorting (1998) Shipping Calculation Problem (1997) easiest way to check for a non-alphanumeric character? (2000) RAM variables (1997) From database to email (1999) TCPConnect and Sandbox (2003) RE: E-mailer error codes (1997) Firesite cache vs webcat cache (1997) No luck with taxes (1997) Laying an egg. (1998) Digest Version (2000)