Re: [WebDNA] showif/sendmail question
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 100445
interpreted = N
texte = Thanks for the responses... I thought that I would try for a simple syntaxerror before going into detail.So here's the what's happening... Site members login and submit a requestform. Options on the form vary based on [member] level using the [showif],and this seems to work well.What I am attempting with this code, is to email the submitted data tovarying people/departments based on the membership level - this is stored inthe prefs.db. eg. If member1, then email to dept1@yourco.comThe specific error that I was seeing in the log was "bad email address", butwhen I put the [lookup db=prefs.db... In the page, it pulled the exactlycorrect email.I'm betting that there is a better way to accomplish this, but would stilllike to understand why this failed.Any suggestions are appreciated... Thanks in advance.-ChrisOn 8/1/08 5:01 PM, "Donovan Brooke"
wrote:> cw@e-wave.net wrote:>> Greetings,>> >> Any idea why won't this code work? Each element [showif, sendmail,>> lookup, formvariables] works fine separately, but not together...> > > I would ask the same as Terry.. what is happening?> > I don't notice any syntax errors with the code itself.. however,> code is hard to troubleshoot when out of its context. I just> changed one thing to allow for hiding if the email is blank:> > [showif member^[type]]> [text]toemail=[lookup> db=prefs.db&lookinfield=pref&value=EMAIL_CC&returnfield=value][/text]> [hideif [url][toemail][/url]=]> [sendmail to=[toemail]&from=[convertchars> db=convert_quotes.db][EMAIL][/convertchars]t&subject= Request]> [formvariables name=__&exact=f]> [getchars start=3][name][/getchars]: [value]> [/formvariables]> [/sendmail]> [/hideif]> [/showif]> > > However, if you know your .db records have accurate emails, then> you wouldn't have to do that check.> > Donovan> > > > > > > >
Associated Messages, from the most recent to the oldest:
Thanks for the responses... I thought that I would try for a simple syntaxerror before going into detail.So here's the what's happening... Site members login and submit a requestform. Options on the form vary based on [member] level using the [showif],and this seems to work well.What I am attempting with this code, is to email the submitted data tovarying people/departments based on the membership level - this is stored inthe prefs.db. eg. If member1, then email to dept1@yourco.comThe specific error that I was seeing in the log was "bad email address", butwhen I put the [lookup db=prefs.db... In the page, it pulled the exactlycorrect email.I'm betting that there is a better way to accomplish this, but would stilllike to understand why this failed.Any suggestions are appreciated... Thanks in advance.-ChrisOn 8/1/08 5:01 PM, "Donovan Brooke" wrote:> cw@e-wave.net wrote:>> Greetings,>> >> Any idea why won't this code work? Each element [showif, sendmail,>> lookup, formvariables] works fine separately, but not together...> > > I would ask the same as Terry.. what is happening?> > I don't notice any syntax errors with the code itself.. however,> code is hard to troubleshoot when out of its context. I just> changed one thing to allow for hiding if the email is blank:> > [showif member^[type]]> [text]toemail=[lookup> db=prefs.db&lookinfield=pref&value=EMAIL_CC&returnfield=value][/text]> [hideif [url][toemail][/url]=]> [sendmail to=[toemail]&from=[convertchars> db=convert_quotes.db][EMAIL][/convertchars]t&subject= Request]> [formvariables name=__&exact=f]> [getchars start=3][name][/getchars]: [value]> [/formvariables]> [/sendmail]> [/hideif]> [/showif]> > > However, if you know your .db records have accurate emails, then> you wouldn't have to do that check.> > Donovan> > > > > > > >
Chris Wilkinson
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:
[WebDNA] Credit card processing (2012)
restart needed???? (1997)
Include a big block of text (1997)
New servers and new inline cache (1997)
Setting up WebCatalog with Retail Pro data (1996)
Sku numbers (1997)
' add to cart ' or ' sku ' problem (1998)
price carry over (1997)
Passwords, Subscription, DBs, oh my! (2000)
Show shoppingcart after remove last item (1997)
Signal Raised error (1997)
WebCat2b12 CGI Mac -- Problems propagating the cart through frames...still (1997)
RE: automatic reload of frameset (1997)
fieldType=num (1997)
hmmm (2006)
[WriteFile] problems (1997)
apparent variable variable display? (2000)
Prevent multiple appends with Reload Button (1997)
Beta 18 (1997)
[/application] error? (1997)