Enonic version: 6.5.2
OS: Windows 7 x64
I have found strange behaviour when adding “bcc” to the object for mail sending, you are not getting any mails on “bcc” adresses. I have digged into it and found that my “bcc” is not send to SMTP like “RCPT TO”.
And if you will try to do it like in example:
return mail.send({
from: 'Sales Department <[email protected]>',
to: '[email protected]',
subject: 'Email Test from Enonic XP',
cc: ['[email protected]'],
bcc: ['[email protected]', '[email protected]'],
replyTo: '[email protected]',
body: 'Welcome to Enonic XP!' + '\r\n\r\n' + '- The Dev Team',
headers: {
'Disposition-Notification-To': '[email protected]'
}
});
you will get such SMTP logs:
220 localhost smtp4dev ready
EHLO AYOUVKO-NN.infopulse.local
250-Nice to meet you.
250-8BITMIME
250-STARTTLS
250-AUTH=CRAM-MD5 PLAIN LOGIN ANONYMOUS
250-AUTH CRAM-MD5 PLAIN LOGIN ANONYMOUS
250 SIZE
MAIL FROM:[email protected]
250 Okey dokey
RCPT TO:[email protected]
250 Recipient accepted
DATA
354 End message with period
From: Sales Department [email protected]
Reply-To: [email protected]
To: [email protected]
Cc: [email protected]
Message-ID: 614689189.4.1465813381497.JavaMail.Alexander.Youvko@AYOUVKO-NN
Subject: Email Test from Enonic XP
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Disposition-Notification-To: [email protected]
Welcome to Enonic XP!
- The Dev Team
.
250 Mail accepted
QUIT
221 See you later aligator