I have something like this in my Dockerfile
RUN echo $\'defaults \\n\\ auth on \\n\\ tls on \\n\\ account gmail \\n\\ host $SMTP_HOSTNAME \\n\\ port $SMTP_POR