Hi,
have a closer look at Report /SAPSRM/OFFLINEAPPROVALSEND.
It does something similar to your requirement though it's for sending offline approval E-Mails.
You will have to find the part of code where the link to SRM System an the corresponding Purchasing document is created.
Regards
Stephan