+1 vote

Good day,

I am using Mail.dll email library version 3.0.24030.1216, Bcc recipients do not receive emails, is this a known bug, or what am I doing incorrectly

Below is a snippet

        MailBuilder builder = new MailBuilder();
        builder.Bcc.Add(new MailBox("bcc@example.com", ""));
        IMail email = builder.Create();
        ISendMessageResult result = smtp.SendMessage(email);

Here are the logs:

83AE Connecting to 'smtp.gmail.com:587', SSL/TLS: False.
83AE S: 220 smtp.gmail.com ESMTP 6a1803df08f44-6a15f1cd250sm68084186d6.98 - gsmtp
83AE C: EHLO [192.168.2.34]
83AE S: 250-smtp.gmail.com at your service, [142.118.186.199]
83AE S: 250-SIZE 35882577
83AE S: 250-8BITMIME
83AE S: 250-STARTTLS
83AE S: 250-ENHANCEDSTATUSCODES
83AE S: 250-PIPELINING
83AE S: 250-CHUNKING
83AE S: 250 SMTPUTF8
83AE C: STARTTLS
83AE S: 220 2.0.0 Ready to start TLS
83AE C: EHLO [192.168.2.34]
83AE S: 250-smtp.gmail.com at your service, [142.118.186.199]
83AE S: 250-SIZE 35882577
83AE S: 250-8BITMIME
83AE S: 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
83AE S: 250-ENHANCEDSTATUSCODES
83AE S: 250-PIPELINING
83AE S: 250-CHUNKING
83AE S: 250 SMTPUTF8
83AE C: AUTH LOGIN
83AE S: 334 VXNlcm5hbWU6
83AE C: XXXXXX
83AE S: 334 UGFzc3dvcmQ6
83AE C: XXXXXX
83AE S: 235 2.7.0 Accepted
83AE C: MAIL FROM:<from@gmail.com>
83AE C: RCPT TO:<to@gmail.com>
83AE C: RCPT TO:<bcc@example.com>
83AE C: NOOP
83AE S: 250 2.1.0 OK 6a1803df08f44-6a15f1cd250sm68084186d6.98 - gsmtp
83AE S: 250 2.1.5 OK 6a1803df08f44-6a15f1cd250sm68084186d6.98 - gsmtp
83AE S: 250 2.1.5 OK 6a1803df08f44-6a15f1cd250sm68084186d6.98 - gsmtp
83AE S: 250 2.0.0 OK 6a1803df08f44-6a15f1cd250sm68084186d6.98 - gsmtp
83AE C: BDAT 43175 LAST
83AE C (43175 bytes):
Content-Type: multipart/alternative;
 boundary="----=_NextPart_26377329.622898263202"
MIME-Version: 1.0
Date: Wed, 15 May 2024 15:55:41 -0400
Message-ID: <49aa24f6-5a18-480d-9cd0-315a5851d918@mail.dll>
Subject: XXXX
From: <from@gmail.com>
To: "" <to@gmail.com>

[CUT]
83AE S: 250 2.0.0 OK 6a1803df08f44-6a15f1cd250sm68084186d6.98 - gsmtp
by

1 Answer

0 votes
 
Best answer

Examining the logs shows that Mail.dll client behaves properly: Two 'RCPT TO' commands are issued.

I double checked this with all gmail addresses and email is delivered correctly to both addresses (to and bcc).

I assume that your server (example.com in the logs) is simply rejecting the message, or treats it as spam.

One thing that stands out is that you are using empty mailbox name, which is a bit problematic - consider not setting the name or use a non-empty one.

by (301k points)
...