REF: pipeline: fixed email message sending and refactored email param
REF: pipeline: fixed email message sending and refactored email param

Former-commit-id: c156959fc96b223c24cbda52b4b32aee7990866c
neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox