Sanmina ( SANM) beat analysts' earnings estimates for the fiscal second quarter by a penny, but the company guided investors down for the upcoming period.

The provide of electronic manufacturing services posted income of $114.9 million, or 34 cents a share, excluding charges, which was in line with Wall Street's 21-analyst consensus projection. Sanmina earned $59 million, or 18 cents a share, in the year-ago period.

Revenue grew to $1.19 billion from $948.4 million in the same period last year. Nine analysts polled by Thomson Financial/First Call were expecting revenue of $1.28 billion.

Sanmina said it is targeting revenue of $900 million to $1 billion for the third quarter, with earnings of 18 cents to 22 cents. Analysts are expecting revenue of $1.3 billion, with earnings of 32 cents in the quarter.

Shares of Sanmina, which is based in San Jose, Calif., gained $4.65, or 20.5%, to $27.33 in regular-session Nasdaq trading, but fell 34 cents, or 1.2% in recent after-hours Instinet activity.

More from Stocks

Cannabis Could Be the Biggest Thing for CPG Industry Since Sliced Bread

Cannabis Could Be the Biggest Thing for CPG Industry Since Sliced Bread

Big Blue Looks Stronger in the Weeks Ahead - Go Long Here and on Strength

Big Blue Looks Stronger in the Weeks Ahead - Go Long Here and on Strength

What the Government Shutdown Means for Retail

What the Government Shutdown Means for Retail

Here's How CSX Corp. Can Lead Transports Higher

Here's How CSX Corp. Can Lead Transports Higher

Jim Cramer Explains Why Analysts Got Goldman All Wrong

Jim Cramer Explains Why Analysts Got Goldman All Wrong