Produces CoA thioesters of a variety of hydroxy- and methoxy-substituted cinnamic acids, which are used to synthesize several phenylpropanoid-derived compounds, including anthocyanins, flavonoids, isoflavonoids, coumarins, lignin, suberin and wall-bound phenolics. (E)-4-coumarate + ATP + CoA = (E)-4-coumaroyl-CoA + AMP + diphosphate Phytoalexin biosynthesis; 3,4',5-trihydroxystilbene biosynthesis; 3,4',5-trihydroxystilbene from trans-4-coumarate: step 1/2. Preferentially expressed in roots, bolting stems and siliques. Also detected in leaves. By wounding, UV irradiation, and pathogen attack. Both substrate-binding domains (SBD1 and SBD2) are involved in the substrate recognition, and are sufficient to confer the substrate specificity. Belongs to the ATP-dependent AMP-binding enzyme family.