[BULK] Re: [WebDNA] Multiple e-mail sending

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107716
interpreted = N
texte = Well that has to do with how the process is defined, first they do the search to bring up the list of customers, then they pack the items for each customer, send it from the distribution center to the store, and then the store uses the same interface to find the customers, and only then click the button to snd the emails but I supose I could just do another version of the same interface, where the second one has the sendmail code in it, that would probably be the easiest thing to do. Don't know why I didnt come up with that, thanks /Tommy On 17-11-2011 22:05, Marc Thompson wrote: > Don't think you need to create the emails.db file at all? > Why not just put your [sendmail] inside the [founditems] [/founditems] > context? It acts as a loop with [numfound] as the loop count. > > Marc > > On 11/17/2011 1:41 PM, Tommy Bell wrote: >> 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 >>> >> > Associated Messages, from the most recent to the oldest:

    
Well that has to do with how the process is defined, first they do the search to bring up the list of customers, then they pack the items for each customer, send it from the distribution center to the store, and then the store uses the same interface to find the customers, and only then click the button to snd the emails but I supose I could just do another version of the same interface, where the second one has the sendmail code in it, that would probably be the easiest thing to do. Don't know why I didnt come up with that, thanks /Tommy On 17-11-2011 22:05, Marc Thompson wrote: > Don't think you need to create the emails.db file at all? > Why not just put your [sendmail] inside the [founditems] [/founditems] > context? It acts as a loop with [numfound] as the loop count. > > Marc > > On 11/17/2011 1:41 PM, Tommy Bell wrote: >> 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 >>> >> > 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:

WebCat name recognition (1998) textarea inputs and returns (1999) WebCat2: multiple currency support (1997) What's the grep? (2004) WebCat2_Mac RETURNs in .db (1997) Using Plug-In while running 1.6.1 (1997) Displaying photo attached to first record (1997) math a various prices (1997) Problems With NT 4.0.1 Install (2000) More NT encyption!! (1999) PIXO support (1997) Questions To Answer (1997) Help name our technology! (1997) Formating Tables w/[founditems] (1998) NT Version on IIS 4.0 (1997) reserved characters for field names? (1998) Using a database with a short url (2000) [WebDNA] Add to cart (2014) Can't Update records (1997) RE: Adding headers to email (1997)