I have an application which needs the full path of the file when clicking on choose file button. Now I want to get the full path of that file. For e.g. D:\MyNodeApp\project\text.doc

How do I get the file location in node.js?
['https://Stackoverflow.com/questions/57477658', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10709726/']
async/await doesn't really matter here because it will essentially wrap/unwrap promises (which you arent using)

I dont really see a problem here. Your `console.log(__email__info)` and your `__email__info.push(__vs_status__)` both need to be within the callback of `transporter.sendMail`

so, the below:

```
_send_to_.forEach( /* tried[2]  async here */ email => {
  verifyEmailExist(email, (ev) => {
    console.log(ev.smtpCheck)
    if (ev.smtpCheck == 'true') {

        __vs_status__.email_v = true
        transporter.sendMail(mailOptions, function (error, info) { //want to wait for this too but couldn't test bcz valid email wait was not working properly
            if (error) {
                console.log(error);
                __vs_status__.email_s = false
            } else {
                __vs_status__.email_s = true
            }
            __email__info.push(__vs_status__)
            console.log(/* tried[1]  await here */ __email__info)
        });
    }
  })
});

```
Its better to use for of loop then for each loop, as for each loop contains callbacks. Here using request-promise module as it returns promise. ANd promisify object of the util library. So that the method which accepts callbacks are converted into promises.

```
const rp = require('request-promise'),
    {promisify} = require('util');

function sendMails(fields) {
    var transporter = nodemailer.createTransport({
        host: 'smtp.gmail.com',
        port: 587,
        secure: false,
        requireTLS: true,
        auth: {
            user: email_from,
            pass: password
        }
    });
    var mailOptions = {
        from: email_from,
        to: _send_to_.toString(),
        subject: fields.email_subject,
        text: fields.msg_type == 'text' ? fields.message_text : '',
        html: fields.msg_type == 'html' ? fields.message_text : ''
    };
    let __vs_status__ = {
        email: email,
        email_v: false,
        email_s: false
    };
    _send_to_ = fields.emails
    for (var email of _send_to_) {
        var ev = await verifyEmailExist(email)
            console.log(ev.smtpCheck)
            if (ev.smtpCheck == 'true') {

                __vs_status__.email_v = true
                const sendMail = promisify(transporter.sendMail).bind(transporter);
                const info = await sendMail(mailOptions);
                if (!info) {
                    console.log("error");
                    __vs_status__.email_s = false
                } else {
                    __vs_status__.email_s = true
                }
            }
            __email__info.push(__vs_status__)
    }
    console.log( /* tried[1]  await here */ __email__info) // this prints before loop and callbacks gets completed (don't want that)
}

// ----------------------------- EMAILS EXIST CHECK CALLBACK ---------------
async function verifyEmailExist(email, callback) {
    console.log('callback ' + email)
    var email = email;
    var api_key = apikey;
    var api_url = 'https://emailverification.whoisxmlapi.com/api/v1?';
    var url = api_url + 'apiKey=' + api_key + '&emailAddress=' + email;
    const str = await rp(url);
    return JSON.parse(str);
}

```