Need to overwrite shell script using vi editor

I have an existing shell script that I am trying to modify. I have about 10 lines of info I want to overwrite using text someone emailed to me. I guess what I am trying to do basically is like a copy/paste, but it's not working for me.

I am using Cygwin and vi editor.

I open the script and go into insert mode. I am deleting the lines I don't need by putting the cursor in the line I want gone and typing esc + dd.

I want to paste about 10 lines in of the script that was emailed to me. I use a esc + p to paste, but that command pastes in the lines that I just deleted instead of what I copied from the email.

Is there a way to paste the text from the email into my script?

just go to insert mode in vi (esc i) and paste the text from the email via right mouse button to the terminal/cygwin window.

That is exactly what I tried. When I paste the text from the email, it actually puts the lines of text I just deleted back instead of my email.

esc + p command per the vi command list I found from googling says esc + p "to paste the text just deleted or copied at the cursor".

It's pasting the test I deleted, but I want it to paste the text I just copied from the email.

Copy the email contents, place the cursor in vi where you want to paste the data, go to insert mode and press, shift+insert.

--ahamed

as already said, use the right mouse button (paste) and not esc+p.