Example 1 is a better option for few reasons. Primarily "less is better on the UI"
ItsIt's a standard interaction which is based on progressive disclosure pattern. It is better to remove unnecessary content on interface till itsit's needed (i.e in this case only if user choosechooses to "deliver as attachment", attachment option shows up. tillTill then itsit's hidden).
The connection between the related content and its parent is immediately obvious. In the second option you have bring extra design elements to show the relation, thereby further adding noise to the interface.
Other concerns of scrolling isare in fact a bigger and serious problem in Example 2. In case if the select attachment goes out of the scroll, then the user will never know that the related option has opened below the scroll.
However, Example 1 will only work if the related content is a small task such as 'attaching a file",. If the related content is more complex then this fails.