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 <sales@enonic.com>',
to: 'Youvko@gmail.com',
subject: 'Email Test from Enonic XP',
cc: ['other@enonic.com'],
bcc: ['originyouvko@gmail.com', 'other@enonic.com'],
replyTo: 'support@enonic.com',
body: 'Welcome to Enonic XP!' + '\r\n\r\n' + '- The Dev Team',
headers: {
'Disposition-Notification-To': 'me@enonic.com'
}
});
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:sales@enonic.com
250 Okey dokey
RCPT TO:Youvko@gmail.com
250 Recipient accepted
DATA
354 End message with period
From: Sales Department sales@enonic.com
Reply-To: support@enonic.com
To: Youvko@gmail.com
Cc: other@example.org
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: me@enonic.com
Welcome to Enonic XP!
- The Dev Team
.
250 Mail accepted
QUIT
221 See you later aligator