We are using Email Extension plugin to send emails before build.
Default subject is defined as
Our Jenkins and email-ext plugin versions are
In Freestyle project, Editable Email Notification for Before build it is defined like this
When email arrives from Freestyle project, subject for $BUILD_STATUS has value Building and it looks like this
In Pipeline project there is not explicit command for before build, so we simply used this code below in stage before actual build
When email arrives from Pipeline project, subject for $BUILD_STATUS has value SUCCESS and it looks like this
which is incorrect because the build stage is not jet started.
We also defined sending email in post stageon Success for both Freestyle and Pipeline project, and when email arrives it has Successful string in subject. That is working OK.
It seems that in pipeline case, for before build, $BUILD_STATUS in subject is not correctly replaced with Building string. Instead it is replaced with SUCCESS string what is misleading because build nor the other stages were finished.