Well I had moved forward a little bit on this:
Now I’m having issues with the final step on the email sent.
############################################
is like is getting a wrong $variable email address variable
[2020-05-13 01:33:26 +0000] warning/PluginNotificationTask: Notification command for object 'fileserver' (PID: 8659, arguments: '/etc/icinga2/scripts/mail-host-notification.sh' '-b' '' '-d' '2020-05-13 01:33:25 +0000' '-l' 'fileserver' '-n' 'fileserver' '-o' 'PING CRITICAL - Packet loss = 100%' '-r' 'yyyyyyyy@xxxxxxx.com' '-s' 'DOWN' '-t' 'PROBLEM') terminated with exit code 1, output: ssmtp: RCPT TO:<[PROBLEM] Host fileserver is DOWN!@gmail.com> (553 5.1.3 is not a valid RFC-5321 address. 14sm13098553pfy.38 - gsmtp)
root@icinga2:/home/ubuntu# cat /etc/ssmtp/ssmtp.conf
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=xxxxxxxx@gmail.com
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:587
AuthUser=xxxxxxxx@gmail.com
AuthPass=xxxxxxxxxxxxxxxx
UseTLS=YES
UseSTARTTLS=YES
# Where will the mail seem to come from?
rewriteDomain=gmail.com
# The full hostname
hostname=xxxxxxxx45.us-west-1.compute.amazonaws.com
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES
Debug=YES
root@icinga2:/home/ubuntu# cat /etc/ssmtp/revaliases
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:xxxxxxxxx@gmail.com:smtp.gmail.com:587
SSMTP LOG:
May 13 01:53:27 icinga2 sSMTP[9012]: Creating SSL connection to host
May 13 01:53:27 icinga2 sSMTP[9012]: 220 smtp.gmail.com ESMTP d18sm13139547pfq.177 - gsmtp
May 13 01:53:27 icinga2 sSMTP[9012]: EHLO ecXXXXXXX-west-1.compute.amazonaws.com
May 13 01:53:27 icinga2 sSMTP[9012]: 250 SMTPUTF8
May 13 01:53:27 icinga2 sSMTP[9012]: STARTTLS
May 13 01:53:27 icinga2 sSMTP[9012]: 220 2.0.0 Ready to start TLS
May 13 01:53:28 icinga2 sSMTP[9012]: SSL connection using ECDHE_ECDSA_CHACHA20_POLY1305
May 13 01:53:28 icinga2 sSMTP[9012]: EHLO eXXXXXXXX45.us-west-1.compute.amazonaws.com
May 13 01:53:28 icinga2 sSMTP[9012]: 250 SMTPUTF8
May 13 01:53:28 icinga2 sSMTP[9012]: AUTH LOGIN
May 13 01:53:28 icinga2 sSMTP[9012]: 334 XXXXX
May 13 01:53:28 icinga2 sSMTP[9012]: XXXXXXXXXX=
May 13 01:53:28 icinga2 sSMTP[9012]: 334 XXXXXXXX
May 13 01:53:28 icinga2 sSMTP[9012]: XXXXXXXXXX==
May 13 01:53:28 icinga2 sSMTP[9012]: 235 2.7.0 Accepted
May 13 01:53:28 icinga2 sSMTP[9012]: MAIL FROM:<nagios@XXXXXXXX.us-west-1.compute.amazonaws.com>
May 13 01:53:28 icinga2 sSMTP[9012]: 250 2.1.0 OK d18sm13139547pfq.177 - gsmtp
May 13 01:53:28 icinga2 sSMTP[9012]: RCPT TO:<[PROBLEM] Host fileserver is DOWN!@eXXXXXX136-45.us-west-1.compute.amazonaws.com>
May 13 01:53:28 icinga2 sSMTP[9012]: 553 5.1.3 address. d18sm13139547pfq.177 - gsmtp
May 13 01:53:28 icinga2 sSMTP[9012]: RCPT TO:<[PROBLEM] Host fileserver is DOWN!@ecXXXXXXXX136-45.us-west-1.compute.amazonaws.com> (553 5.1.3 address. d18sm13139547pfq.177 - gsmtp)
ssmtp works fine I tested it with the same .conf and it was able to send emails out.
Thanks in advance guys.