And when does one recite the blessing? The Tur and the Shulchan Aruch wrote: at the time he collects from the residents of the alleyway, or if one person grants them merit—he blesses at the time of the granting of merit. That is to say, and not before, but afterward—he may bless. And we have a general rule that the blessings are not indispensable; therefore, if they collected for the sake of an eruv and forgot and did not bless over it—the blessing is not indispensable. And it appears to me that the statement "With this eruv" is indispensable, for if not so, from where is it recognizable that this is an eruv? However, according to our custom, where the shamash makes the eruv by the command of the community and grants merit to all the residents of the city, and places the eruv in the synagogue, which is a great recognition that this is an eruv—then even the statement "With this" is not indispensable. (The Levush wrote that their custom was to collect flour from every house, and the shamash would bake from it for the eruv and eat the rest—it is not an eruv if they forgot to bless, since there is no granting of merit here and not everyone's portion entered into the eruv. And the Taz disputed him, because each one gives the small amount of flour so that the entire community will merit in it; see there.)
ואימתי מברך, כתבו הטור והש"ע - בשעה שמקבץ מבני המבוי, או אם אחד מזכה להם - מברך בשעת הזיכוי. כלומר, ולא קודם, אבל אחר כך - יכול לברך. וכללא בידינו דאין הברכות מעכבות, ולכן אם גבו לשם עירוב ושכחו ולא בירכו עליו - אין הברכה מעכבת. ונראה לי דאמירת 'בהדין עירובא' - מעכב, דאם לא כן מאין ניכר שזהו עירוב. אך לפי מנהגינו, שהשמש מערב ממצות הקהל ומזכים לכל בני העיר, ונותן העירוב בבית הכנסת, דזהו היכר גדול שזהו עירוב - דאז גם אמירת 'בהדין' אינו מעכב. (הלבוש כתב שמנהגם היה לגבות קמח מכל בית, והשמש היה אופה מהן לעירוב, והשאר אכל - אינו עירוב אם שכחו לברך, כיון דאין כאן זיכוי ולא של כולם נכנס בהעירוב. והט"ז השיג עליו, משום דכל אחד נותן מעט הקמח שכל הקהל יזכו בו ע"ש)