I have this database set up with a push button to send out Emails to people who have Emails. The server only lets you send out 165 Emails at a time. I need to send out sometimes up to 1500. How can I do this??????
Not that I condone this time of action, but are you using a DoCmd.SendObject to process this? If so, instead of send one mail to each person, create a variable that houses a bunch of email addresses at a time and include the variable for the to arguement....
So one and so forth.....I would try maybe about 100 addresses or so per mail.....This will send an email to everyone in the to list but is one one outgoing email for you.... Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need!
Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
This is my code for the Send Email... I have a query also set up... Like sometimes I have to search for people living on a specific street....
Sub SendEmail()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim qdf As DAO.QueryDef
Dim strEmail As String
strEmail = ""
Set db = CurrentDb
Set qdf = db.QueryDefs("QryEmail" 'This should be the name of your query
Set rs = qdf.OpenRecordset
rs.MoveFirst
Do Until rs.EOF
If rs!email1 = "" Then
If rs!email2 = "" Then
Else
If strEmail = "" Then
strEmail = rs!email2
Else
strEmail = rs!email2 & "; " & strEmail
End If
End If
Else
If rs!email2 = "" Then
If strEmail = "" Then
strEmail = rs!email1
Else
strEmail = rs!email1 & "; " & strEmail
End If
Else
strEmail = rs!email1 & "; " & rs!email2 & "; " & strEmail
End If
End If
rs.MoveNext
Loop
Set lobjOutlook = CreateObject("Outlook.application"
Set lobjMail = lobjOutlook.CreateItem(0)
Let lobjMail.Subject = "TESTING E-Mail" 'Change the subject to anything you
'Let lobjMail.To = ""
'Let lobjMail.CC = ""
Let lobjMail.BCC = strEmail 'your list of email addresses
'Let lobjMail.HTMLBody = "Do you want the email to have a message?" 'Change
'the message of the email
'Let lobjMail.Body = "Do you want the email to have a message?" 'Change the
'message of the email
lobjMail.Save 'This command will save the email as a draft
'lobjMail.Send 'I commented this out so you can see the email before it sends
End Sub
I will say that by using the Outlook connection, you are at least using the right track...much better than using the DoCmd.SendObject.
I would move the strEmail from the BCC line to the To line, unless you are really trying to mask who you sending these mails to, then I would include yourself in the To line.....I am unsure if the mail willl even be processed with at least one address in the to line....so put yours there and everyone else in the BCC if you are trying to hide the list... Please remember to give helpful posts the stars they deserve! This makes the post more visible to others in need!
Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.