Wikipedia gives a summary of this event:
Contrary to popular belief, King Mongkut did not offer a herd of war elephants to the US president Abraham Lincoln during the American Civil War for use against the Confederacy. He did, however, offer to send some domesticated elephants to US president James Buchanan, to use as beasts of burden and means of transportation. The royal letter of 14 February 1861, which was written even before the Civil War started, took some time to arrive in Washington DC, and by the time it reached its destination, President Buchanan was no longer in office. (Text of the royal letter here.) Lincoln, who succeeded Buchanan, is said to have been asked what the elephants could be used for, and in reply he said that he did not know, unless "they were used to stamp out the rebellion." However, in his reply dated 3 February 1862, Lincoln did not mention anything about the Civil War. The President merely politely declined to accept King Mongkut's proposal, explaining to the King that the American climate might not be suitable for elephants and that American steam engines could also be used as beasts of burden and means of transportation.
Elephants had long ceased to be useful in warfare by 1862 in any case:
With the advent of gunpowder warfare in the late 15th century, the balance of advantage for war elephants on the battlefield began to change. While muskets had limited impact on elephants, which could withstand numerous volleys, cannon fire was a different matter entirely—an animal could easily be knocked down by a single shot. With elephants still being used to carry commanders on the battlefield, they became even more tempting targets for enemy artillery.
tl; dr: King Mongkut didn't offer war elephants, he offered domesticated elephants. He did this before the American Civil War started (which was also why the letter was addressed to James Buchanan). Lincoln declined, preferring to rely on steam engines, and would not have been able to use war elephants effectively anyway.