alykoshin / gmail-send

Minimalistic module to send email using GMail
MIT License
89 stars 26 forks source link

Email not arriving if Recipient is alias #9

Open Miroku87 opened 7 years ago

Miroku87 commented 7 years ago

Hello everyone! I'm encountering an issue while trying to send emails with gmail-send module. When I try to send an email to an alias that groups more than one email the message never arrives (it's not in the spam bin either). This is the code I use is this:

var send = require('gmail-send')(
    {
        user    : 'sender@gmail.com',
        pass    : 'app-specific-password',
        from    : 'Name Surname',
        to      : 'alias@company.com', 
        subject : 'Test gmail-send module',
                text: 'Test mail'
    });
send( {}, 
    function (err, res) 
    {
        if(err)
        {
            console.log('Error occured');
            console.log(err.message);
            return;
        }
        else
        {
            console.log(res);
            console.log('Message sent successfully!');
        }
    });

The callback returns the Success message. When I try to send the same test email with the same code as above to a single-person address the email is received with no problems.

I've tried logging manually to the sender account and send an email to the given alias and the mail was received without problems.

What do you think is the problem?

Thank you in advance!