Hi,
The email id is the first parameter in the setEmailData command (in your case, 1).
To add the transaction id with your current code, two ideas comes to mind:
1st one,
Add a custom field in your email template (say {transid}), and then modify your code like below to include the transaction id as if it was submitted by the user:
..
$MyFormEmails->setEmailData(1, 'enabled', '1');
$tmp = JRequest::get('post', JREQUEST_ALLOWRAW);
$tmp['transid'] = $MyPlugins->cf_paypal_api['transaction_id'];
$MyFormEmails->sendemails($MyForm, $MyFormEmails->emails, $tmp);
...
2nd one,
Add some php-code into your email template. I think you'll need to disable the template editor to accomplish this though (under setup emails). You would insert the following line wherever you wish to add the transaction id:
<? echo $MyPlugins->cf_paypal_api['transaction_id']; ?>
/Fredrik