UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Bulk Email Addresses In 'to' Section In Outlook, Access 2010    
 
   
winterolympic
post Feb 26 2018, 09:41 AM
Post#1



Posts: 443
Joined: 26-March 13



Hi,
I have a query that collect all email addresses from a table to send out 'Auto' reminder emails, if certain criteria met.
I am using Microsoft Outlook.
When I start the database, VBA code checks if that query has records, then send out emails.

For example, if 8 employees don't submit their documents until due date, then the query collect these employees email addresses, then put these email addresses in the 'To' section, then send out an email.
The contents of an email are all the same, so I send out the same content to all employees once, like "Please submit your document. It's overdue.'.

If only one email addresses to send out, then I don't see any problem, but if there are 20, or 30 email addresses in 'TO' , then I got an error.

How can I solve this problems?
Thanks.
Go to the top of the page
 
DanielPineault
post Feb 26 2018, 09:50 AM
Post#2


UtterAccess VIP
Posts: 6,273
Joined: 30-June 11



What error?

ISPs, email servers sometimes block e-mails with too many recipients thinking they look like SPAM. Why not send an individual e-mail per recipient?
Go to the top of the page
 
winterolympic
post Feb 26 2018, 10:05 AM
Post#3



Posts: 443
Joined: 26-March 13



I can't generate the error message right now, sorry. If I can, I will let you know.
But, the email messages are all same and simple messages. That's why I want to send out just one reminder email, if possible.


CODE
   rs.MoveFirst
       Do Until rs.EOF
              emailR = emailR & rs("CompanyEmail") & ";"
              rs.MoveNext
        Loop
        emailR = Left(emailR, Len(emailR) - 1)        
        nTo = emailR


This is my partial code above.
nTo is the 'To' section in Outlook.
Do you think this code is good?


Thanks.
This post has been edited by winterolympic: Feb 26 2018, 10:07 AM
Go to the top of the page
 
DanielPineault
post Feb 26 2018, 10:12 AM
Post#4


UtterAccess VIP
Posts: 6,273
Joined: 30-June 11



Yes, you're simply separating the e-mail with a ; which is what you're supposed to do. You don't even need the line emailR = Left(emailR, Len(emailR) - 1) because there is nothing wrong with having a ; on the last entry, but it also doesn't hurt the way it is currently coded either.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    13th December 2018 - 08:08 AM