J.M. Smucker Co , best known for its peanut butter and jelly, posted higher-than-expected quarterly results, driven by strong margins at its Folgers coffee business, and raised its full-year profit outlook, sending its shares up 5 percent.

The company, which also manufactures and markets fruit spreads, retail packaged coffee, ice cream toppings and sweetened condensed milk, saw overall gross margin rise to 33.8 percent from 28.9 percent in the year-ago period.

Gross margin at Folgers, the largest producer of retail packaged coffee in the United States, was helped partly by green coffee market conditions and favorable product mix, the company said in a statement.

Strong performance at Folgers has boosted Smucker's results since the company bought the coffee business last November. Folgers' product offerings include the namesake brand, Millstone brand and a license to manufacture and distribute Dunkin' Donuts coffee in the retail grocery market.

Also, other brands such as Pillsbury flour, Crisco oils, Jif peanut butter, and Hungry Jack have performed relatively well in the recession as consumers eat more at home, and have offset weaker sales in the company's foodservice and natural foods businesses.

For the second quarter ended October 31, the company posted a net income of $140 million, or $1.18 a share, compared with $51.5 million, or 94 cents a share, a year ago.

Excluding items, the company earned $1.22 a share.

Analysts on average expected $1.04 a share, before items, on revenue of $1.24 billion, according to Thomson Reuters I/B/E/S.

Revenue rose 52 percent to $1.28 billion.

Orrville, Ohio-based Smucker raised its full-year 2010 earnings outlook to a range of $3.95 to $4.05 a share, from its previous range of $3.65 to $3.80 a share.

Smucker's shares were trading up at $55.97 before the bell. They closed at $53.48 Thursday on the New York Stock Exchange.

(Reporting by Mihir Dalal in Bangalore; Editing by Unnikrishnan Nair)