David Lee Posted September 12, 2007 Share Posted September 12, 2007 hello all, i would like to ask the following: when i use the send mail function in filemaker one mail for all people in the database (i have 10 000 entries) it does not work. when i send one by one, it works like a charm, but i have a limit of emails that i can send over my domain email. is there a way to specify the numebr of recipients, for example, 50 per email, so it will send first 50 entries one email, then the next 50 and so on and so forth.... please help me with this, i will be very grateful Link to comment Share on other sites More sharing options...
Søren Dyhr Posted September 12, 2007 Share Posted September 12, 2007 Provided you use the foundset default option, could it be done this way: Set Variable [ $n; Value:1 ] Loop Show All Records Go to Record/Request/Page [ $n ] [ No dialog ] Exit Loop If [ Get ( LastError ) = 101 ] Omit Multiple Records [ 50 ] [ No dialog ] Show Omitted Only Send Mail [ ] [ No dialog ] Set Variable [ $n; Value:$n+50 ] End Loop But please do not use this for spamming!!! --sd Link to comment Share on other sites More sharing options...
David Lee Posted September 12, 2007 Author Share Posted September 12, 2007 no i will not use it for spaming. i know it is so bad and i hate when i receive. but one small question - what do i do with this code? do i copy/paste it somewhere and where? well, i am guessing not on a sticky note on the monitor, but a little more information will be helpful. Link to comment Share on other sites More sharing options...
Søren Dyhr Posted September 12, 2007 Share Posted September 12, 2007 You should build a script similar to mine. What it does is that traverses your database, it take chunks of you records in sets of 50 and send a mail to them, when that is done it procedes to the next 50 until an error occures because the script have reached the end of your records. The only way I know of to get text into being script is to use this: http://www.schubec.com/de/product_details_883822.html ...but since it isn't the toughest script known to mankind would I suggest you just do the donkey work via the scriptmaker. --sd Link to comment Share on other sites More sharing options...
David Lee Posted September 13, 2007 Author Share Posted September 13, 2007 i undrstand what it is supposed to do and i am almost done making it in scriptmaker. two questions are that i have now are: when i run the script it opens my mail program with an empty letter, there are no recepients, and as you minght think i want them to be in the bcc field, not to be seen. is it supposed to do it like this? and the next question, i can get everything else by the scriptmakes except [No Dialog] now it pops out a dialog when i start the script and asks where to start the record and i put '1' to start from the beginning. then it pops another window with omit records and it is automatically filled with 50, so i guess this si to jump 50 records ahead. oh, and one more question, while it is going trought the database is filemaker supposed to show me the current record he is on, for example when i start the script - show record 1, after one loop, show record 50, etc. your help will be much appreciated. Link to comment Share on other sites More sharing options...
Søren Dyhr Posted September 13, 2007 Share Posted September 13, 2007 With the send mail dialog do you need to tie each of the instances to the part in the email where it belongs to. Often would you have the text everyone should see put in another table a relation away or in a global field. The no dialog is occuring when you are standing in the line ...see picture above! oh, and one more question, while it is going trought the database is filemaker supposed to show me the current record he is on, for example when i start the script - show record 1, after one loop, show record 50, etc. No not quite, only roughly which set of 50 records it's in at present! --sd Link to comment Share on other sites More sharing options...
David Lee Posted September 14, 2007 Author Share Posted September 14, 2007 (edited) can i just do that instead. i am not very advanced in filemaker so i am trying to keep it simple: when i run the script and it prepares the first email, i can just have the email message body copied and i can just paste it in the email body and then hit send. i do not know if i mention that i am using windows mail for my mail client. i know it sucks, but this is for now... this is the update: i am attaching a picture from my script, i think i am hitting my goal or very very close to it? can you confirm? Edited September 14, 2007 by Guest Link to comment Share on other sites More sharing options...
Søren Dyhr Posted September 14, 2007 Share Posted September 14, 2007 It seems pretty correct to me! --sd Link to comment Share on other sites More sharing options...
David Lee Posted September 14, 2007 Author Share Posted September 14, 2007 (edited) thanks a lot. i believe it is time to test it : after testing this is what i found out - the script i have does NOT combine 50 recipients in each email, instead it sends single email to each recipient. anything wrong with what i have done? Edited September 14, 2007 by Guest Link to comment Share on other sites More sharing options...
Søren Dyhr Posted September 14, 2007 Share Posted September 14, 2007 (edited) Ah, you could make a calc, that grap 50 e-mail addresses over a unequal selfjoin (strainer) via List( and then switch the delimiter from ¶ into ; or , according to which delimiter the mail app requires. But it removes the ability to personalize with Dear mr/mrs NN! Well it get's a little complicated to explain, but take a look at the attached template - please note that I left the dialog on, to prevent sending before the system is thoroughly implemented. --sd mailBatch.zip Edited September 14, 2007 by Guest Link to comment Share on other sites More sharing options...
David Lee Posted September 17, 2007 Author Share Posted September 17, 2007 i am not sure how will this sound, but this also does not do it correctly. it only does one loop and sends email to the first 50 found after which stops. Link to comment Share on other sites More sharing options...
Søren Dyhr Posted September 17, 2007 Share Posted September 17, 2007 It sounds as if there is an error in the script, and indeed there is - it ought to go this way instead: Set Field [ email::FoundSet; Case ( 0;0 ) ] Commit Records/Requests [ Skip data entry validation; No dialog ] Loop Set Variable [ $the50; Value:LeftValues ( List ( email 2::mailAddress ) ; 50 ) ] Send Mail [ BCC: Substitute ( $the50 ; "¶" ; "," ); Subject: "bla bla"; Message: "some other bla bla" ] Set Field [ email::FoundSet; email::FoundSet & "¶" & LeftValues ( List ( email 2::recordID ) ; 50 ) ] Commit Records/Requests [ Skip data entry validation; No dialog ] Exit Loop If [ ValueCount ( $the50 ) < 50 ] End Loop ....can you spot the difference?? I have picked: http://www.filemaker.com/help/Script-Steps4.html Where the script actually needed this: http://www.filemaker.com/help/Script-Steps11.html Indeed a silly mistake to make - I apologize! --sd Link to comment Share on other sites More sharing options...
David Lee Posted September 19, 2007 Author Share Posted September 19, 2007 thanks so much. you trully rock. i am saying this before testing it. : Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6199 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now