Referred these links for configuring the SMTP and AX .

www.vsysad.com/…/configure-iis-smtp-server-to-use-gmail-to-forward-messages

www.junctionsolutions.com/…/creating-automatic-email-confirmations-from-dynamics-ax