Help with BCC emails

Hi. I am trying to send an email to a group of individuals and was planning on using the BCC while sending to myself as the initial recipient. The email addresses to send to in the BCC are in an array. I have the code below for appending to the BCC list, but the email does not seem to send

For i As Integer = 0 To upEmail.Ubound mail.AddBCCRecipient upEmail(i) Next

I am assuming this is generating one long BCC email address instead of the list. What is the correct approach to sending to a group? Do the addresses need to be separated by a comma or a semicolon?

The documentation indicates that is how you would add multiple BCC recipients.
Does the email send when you remove the BCC portion of your code?

Thanks for the reply Tim. Yes, the email sends no problem otherwise. So you agree with my code above? Is there no need to add a separator? such as

For i As Integer = 0 To upEmail.Ubound mail.AddBCCRecipient upEmail(i) + ", " Next

I just changed it to this to test and it sent to both no problem

mail.AddRecipient "info@visualveggies.com" mail.AddBCCRecipient "r.hartz@mac.com"

Would it have anything to do if one or more of the email addresses were invalid?

I do not know :frowning:
What happens if you add two manual, valid AddBCCRecipient lines?

I think I remember that some email servers block emails that have many BCC recipients.

How many emails are you adding as BCCRecipient?

Edit: what email server are you using? Maybe they have information about any filters.

Tested and it went to all three. My info@, my mac.com and an old aol.com addresses

[quote=375672:@Alberto De Poo]I think I remember that some email servers block emails that have many BCC recipients.

How many emails are you adding as BCCRecipient?

Edit: what email server are you using? Maybe they have information about any filters.[/quote]
I’m using a gmail account to send the emails from. There’s currently 561 email address I’m attempting to send to. I will check and see if Google has any information on limits. I may need to split it up. Off hand, is this too many?

Think I found the culprit

[quote]Recipients per message
Addresses in the To, Cc, and Bcc fields of a single email* 2,000 (500 external)[/quote]
https://support.google.com/a/answer/166852?hl=en

I’ll have to chop up the list. Thoughts on a quick and dirty way to use the above code and have the software send multiple emails?

[quote=375674:@Ryan Hartz]Tested and it went to all three. My info@, my mac.com and an old aol.com addresses
[/quote]
My question was more aimed at testing the “needs a comma” theory and testing single vs. multiple BCC recipients and what the outcome would be. I usually just let users send their own emails (showurl(“mailto:”)), so I don’t have much experience with EmailMessage objects.

That there is your problem.

Yes. Completely scrap it. Everyone hates being BCC’d on something.
Send individual emails to individual recipients like commercial bulk email software does.

[quote=375677:@Tim Parnell]Yes. Completely scrap it. Everyone hates being BCC’d on something.
Send individual emails to individual recipients like commercial bulk email software does.[/quote]
Thanks Tim. This is what I was doing previously (having the program loop through each address individually and sending one at a time), but I noticed only about 1/4 of the emails were being sent.

I may just need to utilize my Constant Contact account for this purpose, since that’s what it is intended for anyway :). Was just trying to simplify the process as new people would be opting in to these emails through a user app they’re using. It will just be a little more challenging to see who is a new addition to the list

Try batches for connections. Each email should be individually sent, but you can send more than one email per connection.

Then why are you using Gmail / SMTP? Constant Contact does have an API: http://developer.constantcontact.com

Just a note, gmail is not the same as G suite, and the limit is per day. So 561 emails you at least will need to send 2 groups (if using gmail), one group one day and the second group other day.

I agree, it is better to use other delivery service.

Thanks all! I’m going to look into using CC for this need