The standard FreeBSD installation uses sendmail as an MTA. Since only administrative mail needs to be sent via a provider getway, this is a little bit of overkill. Instead of using a full featured MTA, ssmtp should be used.
add these lines to rc.conf:
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
remote> sudo pkg install ssmtp
sendmail /usr/local/sbin/ssmtp
send-mail /usr/local/sbin/ssmtp
mailq /usr/local/sbin/ssmtp
newaliases /usr/local/sbin/ssmtp
hoststat /usr/bin/true
purgestat /usr/bin/true
remote> sudo cp /usr/local/etc/ssmtp/revaliases.sample /usr/local/etc/ssmtp/revaliases
remote> sudo vim /usr/local/etc/ssmtp/revaliases
add this line:
root:root_email@example.com:smtp.example.com
root=root_email@example.com
mailhub=smtp.example.com:465
rewriteDomain=example.com
FromLineOverride=YES
UseTLS=YES
Debug=NO
# username and password for smtp
AuthUser=<username>
AuthPass=<password>
AuthMethod=LOGIN