How to add email in new record with hook after or before save?

after seeing github files, both files are same no change.
I found similar issue in following link
https://community.suitecrm.com/t/error-500-after-add-a-calculated-field-in-workflow/55341/5

But I didn’t find solution there also.
I found SweeterCalc pdf that explains all about SweeterCalc.


just for reference.

I searched for FastCGI sent in stderr and some answers tell that it is related to nginx and its configuration. Or may be wrongly installed some scripts. I don’t know what to describe to server administrator about this.