Allow customizing BASE_URI

SendGrid created private hostnames for high volume customers recently, so I implemented this and guessed this could be helpful for others as well.