Please read the tutorial included in the reference below.
Pay special attention to the section that talks about if you choose to use Gmail's servers. Because, your Gmail address will still be included in your email header's sender field, to help prevent your mail from being marked as spam. Most email clients don't display the sender field, though some versions of Microsoft Outlook may display "From yourus...@gmail.com on behalf of custom...@mydomain.com." For this reason, if you don't want 'on behalf of' to appear in any of your messages, Google recommends using the SMTP servers of your other email provider.