The damage being dealt to the secondary target is caused by your spell, not by the weapon. The weapon's enhancement bonus only applies to the attack and damage roll against the primary target.
And unless I'm looking at a different version of the spell than you, the actual text doesn't tell the user to "make a melee spell attack," but rather to "make a melee attack with a weapon."
...you must make a melee attack with a weapon against one creature
within the spell's range ... (SCAG p. 143)
This further reinforces the idea that the secondary fire damage has nothing to do with the otherwise normal attack, as the melee attack is likely going to be modified by STR (or maybe DEX), while the bonus fire damage is likely going to be modified by INT/WIS/CHA.
That, and the whole concept of adding a magic item's enhancement bonus to the damage of a spell seems like an exclusively 4th-edition practice; so it seems unlikely that it would only appear in 5th edition in one specific instance.
So in closing, here's the formulas for attack and damage caused by this spell, in my opinion:
Melee Attack Roll = d20 + (proficiency) + (STR mod) + (magic weapon bonus)
Melee Damage (primary target) = d[w] + (STR mod) + (magic weapon bonus)
Greenflame Damage (secondary target) = (spellcasting mod)