The most convenient and powerful way to access both the quoted name resolver and PubChem is by means of the Cactvs toolkit www.xemistry.com/academic free for academic users).
Unfortunately, your example does not work, since N5023 is not a registered name. But using this tool you can get your structures from recognized names in any of the desired formats, and process the full list with a small script in a batch.
Example code (interactive, you would write a loop over your reference file):
cactvs>ens create N5023
Error: ens create failed: Failed to decode structure data specification
cactvs>ens create "Nordihydroguaiaretic acid"
ens1
cactvs>ens get ens1 E_NAMESET
{4-[(2S,3R)-4-(3,4-dihydroxyphenyl)-2,3-dimethylbutyl]benzene-1,2-diol} {4-[(2S,3R)-4-(3,4-dihydroxyphenyl)-2,3-dimethyl-butyl]benzene-1,2-diol} {4-[(2S,3R)-4-(3,4-dihydroxyphenyl)-2,3-dimethyl-butyl]pyrocatechol} 500-38-9 27686-84-6 334707-72-1 Lopac0_000877 (R*,S*)-4,4'-(2,3-Dimethylbutane-1,4-diyl)bispyrocatechol {1,2-Benzenediol, 4,4'-(2,3-dimethyl-1,4-butanediyl)bis-, (R*,S*)-} Actinex {CHX 100} {EINECS 248-606-6} Masoprocol {Masoprocol [USAN:INN]} {Masoprocolum [INN-Latin]} {Nordihydroguaiaretic acid (meso-form)} meso-4,4'-(2,3-Dimethyltetramethylene)dipyrocatechol meso-NDGA {27686-84-6 (MESO)} AIDS-025463 ZINC00012342 C10719 {Nordihydroguaiaretic acid} {Actinex (TN)} D04862 {Masoprocol (USAN)} EU-0100877 {Nordihyolroguaiaretic acid} AIDS025463 {meso-Nordihydroguaiaretic acid} CHX-100 Lopac-N-5023 NCGC00015741-01 ZINC00056473 NCGC00015741-02 TNP00263
cactvs>ens get ens1 E_CID
71398
cactvs>ens get ens1 E_PUBCHEM_URL
http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=71398
cactvs>ens get ens1 E_CHEMSPIDER_URL
Error: property computation for "E_CHEMSPIDER_URL" failed: property computation for "E_CHEMSPIDER_ID" failed: no chemspider
cactvs>ens get ens1 E_WIKIPEDIA_URL
http://en.wikipedia.org/wiki/Masoprocol
cactvs>molfile write sample1.sdf ens1
ens1
cactvs>ens get ens1 E_GIF
/tmp/cactvs000JXbXdY.gif
cactvs>
very very good advice, will try it