Email Blast works in Developer, not in Client...

The following works perfects in developer, but 30 minutes before a demo for the senior sales staff I found the exact same search does not work in client…

It’s supposed to gather all the email addresses from the email field of a foundset, check for syntax, concatenate them separated by a semi-colon, and put them in the bcc field in Outlook.

Works perfectly in Developer… [which I demo’ed it in :) ] in client it opens up a Firefox tab for each email - right of the @ symbol, using everything left of the at symbol for a potential password for the site…!

//put all email addresses in a one column separated by '; ’ check for ‘www’ and ‘see notepad’ and missing ‘@’
var x = databaseManager.getFoundSetDataProviderAsArray(foundset, ‘cemail’);
var maxReturnedRows = 10000;

var y = ‘’; //initialize a string variable
for (i = 0; i < x.length; i++) {

var inputValue = utils.stringTrim(x*)*
if(x == “” || utils.stringPatternCount(x*,“,”) == 0*
_ && utils.stringPatternCount(x*,“@”) == 1*_

_ && utils.stringPatternCount(x*,“www”) == 0*
&& utils.stringPatternCount(x*,“.”) >= 1*
* )
{
y = utils.stringTrim(y) + '; ’ + x;
} else {
var question = plugins.dialogs.showInputDialog(‘EMAIL FORMAT ERROR’, ‘The email address ’ + inputValue + ‘ does not appear to be correct!’, inputValue);
var query2 = “SELECT ccustno FROM arcust WHERE cemail ='” + inputValue + "’ "
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(),query2,null, maxReturnedRows);
globals.emailTrigger = 1*_

* forms.VAM_Customers.controller.showRecords(dataset)
forms.tab_address_mailing_VAM_arcust.elements.cemail.readOnly = false*

* forms.tab_address_mailing_VAM_arcust.elements.cemail.requestFocus()*

* controller.saveData()*

* return;*
* }*
}
application.setClipboardContent(y);
application.showURL(‘mailto: ?bcc=’ + y)
[/quote]
Any ideas?

Hi,

Check email server settings of the server in a web browser. Server and Developer have their own separate settings.

Also

forms.VAM_Customers.controller.showRecords(dataset)

only works for 1,000 or less records.

swingman:
Hi,

Check email server settings of the server in a web browser. Server and Developer have their own separate settings.

Also

forms.VAM_Customers.controller.showRecords(dataset)

only works for 1,000 or less records.

Which means that this will only load the 1st 1000 records into the form, even if the query returns more.
Use controller.loadRecords(query) instead.

Providence1:
Works perfectly in Developer… [which I demo’ed it in :) ] in client it opens up a Firefox tab for each email - right of the @ symbol, using everything left of the at symbol for a potential password for the site…!

Which version of Servoy are you using?
Before Servoy 3.1 we always showed urls in the browser (especially in the client), since 3.1 we use a different lib which handles urls based on there specification:
-http/https → open browser
-non http → use OS settings to open

I’m on 2.2.7_01, so I’ll have to go to 3.0 to get it to work…

Thanks for the fast reply!!! :D