The Rays are taking on all of Duda's salary, about $2.5 million, according to ESPN's Buster Olney.
Rays manager Kevin Cash said Duda is expected to be in the lineup Friday as the designated hitter.
"He's got a long red-eye flight tonight. He'll get in here, and the plan is to DH him tomorrow," Cash said. "If you think that you're adding a guy like that here with two months, that's a pretty special bat to get."
Expected to contend for an NL East title, the Mets are 47-53 after Thursday's 7-5 loss to the Padres and sit 14 games behind first-place Washington. They are 9½ games out of a wild-card berth.
"I'm excited to join the Rays. They're in the hunt," said Duda, who is hitting .246 with 17 homers and 37 RBIs. "Kind of mixed emotions. There are guys here I've grown pretty close to, and [the Mets] are a first-class organization. I was very proud to be a New York Met, and I'm gonna be very proud to be on the Tampa Bay Rays."
Duda said he had heard rumors about his possible trade.
"I don't think you can really prepare for it," he said. "It just kind of happens, and you just kind of deal with it and accept it and kind of be open to it. But like I said, I'm extremely excited, and I'm looking forward to starting a new step."
Duda, 31, has spent his entire career with the Mets. He is eligible for free agency after the World Series, as are Mets outfielders Curtis Granderson and Jay Bruce, second baseman Neil Walker, shortstop Asdrubal Cabrera and relievers Addison Reed and Jerry Blevins.
Granderson held onto Duda's left leg as Duda walked out, prompting laughter.
"He's been a tremendous part of this team for a long time, and we wish him all the best and thank him for everything he's done here in New York," manager Terry Collins said. "He's very responsible for our success in 2015 and 2016, and we wish him all the best."
Smith, a 23-year-old right-hander, was a third-round draft pick by Detroit two years ago and was dealt to Tampa Bay in April. He is 1-2 with a 1.60 ERA with seven saves in 31 games this season for four minor league teams ranging from Class A to Triple-A.
Earlier Thursday, the Rays acquired left-hander Dan Jennings from the Chicago White Sox for minor league first baseman Casey Gillaspie, the 20th overall pick in the 2014 amateur draft. Outfielder Shane Peterson was designated for assignment to clear space on the 25-man roster for Jennings and the 40-man roster for Duda.
Thursday's deals signaled to players that management thinks the Rays can win this year.
"Their commitment to this team shows a lot," outfielder Steven Souza Jr. said. "We're just excited that they're behind us in this."
The Associated Press contributed to this report.