The Shulchan Aruch · Orach Chayim
אורח חיים תט״וOrach Chayim 415
Siman 415 of 697 in Orach Chayim — 4 se'ifim
הלכות עירובי תחומיןLaws of Eruv Techumin· siman 415
Se’if 1א׳
אֵין מְעָרְבִין עֵרוּבֵי תְּחוּמִין אֶלָּא לִדְבַר מִצְוָה, כְּגוֹן שֶׁהָיָה רוֹצֶה לֵילֵךְ לְבֵית הָאָבֵל, אוֹ לְבֵית הַמִּשְׁתֶּה שֶׁל נִשּׂוּאִין, אוֹ לְהַקְבִּיל פְּנֵי רַבּוֹ אוֹ חֲבֵרוֹ שֶׁבָּא מִן הַדֶּרֶךְ וְכַיּוֹצֵא בְּאֵלּוּ, הַגָּה: אוֹ שֶׁרוֹצֶה לֵילֵךְ לְטַיֵּל בְּיוֹם טוֹב אוֹ בְּשַׁבָּת בְּפַרְדֵּס שֶׁיֵּשׁ בּוֹ שִׂמְחָה בָּזֶה מִקְרֵי דְּבַר מִצְוָה (תְּרוּמַת הַדֶּשֶׁן סִימָן ע"ז), אוֹ מִפְּנֵי הַיִּרְאָה כְּגוֹן שֶׁהָיָה רוֹצֶה לִבְרֹחַ מִן הָעוֹבְדֵי כּוֹכָבִים אוֹ מִן הַלִּסְטִים וְכַיּוֹצֵא בָּזֶה, וְאָז מֻתָּר לוֹ לֵילֵךְ אֲפִלּוּ לִדְבַר הָרְשׁוּת (טוּר וְהָגָ"א פ' בַּכֹּל מְעָרְבִין). וְאִם עֵרֵב שֶׁלֹּא לְאֶחָד מִכָּל אֵלּוּ, אֶלָּא לְדִבְרֵי הָרְשׁוּת, הֲרֵי זֶה עֵרוּב.
That one may only make an eruv of boundaries for a matter of mitzva. Contains 4 sections One may only make an eruv of boundaries for a matter of mitzva — such as wishing to go to a house of mourning, or to a wedding feast, or to greet his teacher or friend who came from a journey, and similar cases. Rema: Or if he wishes to go for a stroll on Yom Tov or Shabbat in an orchard, which brings joy — this is considered a matter of mitzva. Or out of fear, such as wishing to flee from non-Jews or bandits and the like, in which case he is permitted to go even for an optional matter. And if he made an eruv for none of these but for an optional matter, it is nonetheless a valid eruv.
Se’if 2ב׳
אֵין מְעָרְבִין עֵרוּבֵי תְּחוּמִין בֵּין הַשְּׁמָשׁוֹת, וְאִם עֵרֵב, עֵרוּבוֹ עֵרוּב.
One may not make an eruv of boundaries during twilight, but if he did make one it is valid.
Se’if 3ג׳
אָמְרוּ לוֹ שְׁנַיִם: צֵא וְעָרֵב עָלֵינוּ; אֶחָד עֵרֵב עָלָיו מִבְּעוֹד יוֹם וְאֶחָד עֵרֵב עָלָיו בֵּין הַשְּׁמָשׁוֹת, זֶה שֶׁעֵרֵב עָלָיו מִבְּעוֹד יוֹם נֶאֱכָל עֵרוּבוֹ בֵּין הַשְּׁמָשׁוֹת, וְזֶה שֶׁעֵרֵב עָלָיו בֵּין הַשְּׁמָשׁוֹת נֶאֱכָל עֵרוּבוֹ מִשֶּׁחָשְׁכָה, שְׁנֵיהֶם קָנוּ עֵרוּב. וְיֵשׁ חוֹלְקִים.
If two people said to someone "go and make an eruv for us" — one made an eruv for him while it was still day and one made an eruv for him during twilight: the eruv made for him while it was still day was eaten during twilight, and the eruv made for him during twilight was eaten after nightfall — both have acquired a valid eruv. Some disagree.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0