Mad dogs and englishmen

I know about the band, but where did the phrase come from,a poem? Thanks for any help.

I believe the quote:" Only mad dogs and Englishmen go out in the noon day sun." is from Rudyard Kipling...probably from Kim, And Other Stories.