Use gravity form hook to add data before sending an email

Hey everyone,

I’m working on a script that calculates certain distances between two different places and does a calculation here.
Now the calculation is not very interesting.

Only on the one hand I want to read the place of gravity forms.

After that I want to alter the mail before it will be shipped on the mailboat to the customer.
What is the best way to do this.

I tried the gform_after_submission hook. But that one does not seem to be the best approach.

image
Did a error_log to look at the return data