To prevent erosion make a rock bed around the end of the tube.
Installing underground drainage for gutters.
Adjust the t connector so that the top side with the drain is flush with the ground.
Where the tube passes by the downspout from the gutter we installed a y fitting and drained the roof water from the gutter system directly into the main drainage line.
Rainfall runoff from the downspout will first fill the hole you filled with pea gravel.
The process to install underground gutter drainage to move water away from the foundation of a home also known as a french drain.