greaseman
Closer to seniority!
- Local time
- Today, 03:53
- Joined
- Jan 6, 2003
- Messages
- 360
We have an application that sends out thousands of e-mail to our customers. We use a bunch of queries and code to create a file of customers having a valid e-mail address, and then use the DoCmd.SendObject function to send off the e-mails.
In our case, we only send blind copies, so that each recipient doesn't see all of the addresses the mail is sent to. Our problem is that it seems for each e-mail that is bcc'ed, we have to hit the Alt-S key combination from within Outlook to finish sending off the mail.
Here is the code we are trying to work with:
Do Until rsMail.EOF
Do Until lcnt = 100 Or rsMail.EOF
If lcnt = 0 Then
sBCC = rsMail("Email")
Else
Call SysCmd(acSysCmdSetStatus, CStr(lcnt) & " " & rsMail("Email"))
Call WriteFlatFile2("N:\Hey-Sam\WorkingOn\EmailDnrEligBy\Source\EmailDnrEligBy.Log", CStr(lcnt) & " " & rsMail("Email"))
Call WriteLogFile(CStr(lcnt) & " " & rsMail("Email"))
sBCC = sBCC & ";" & rsMail("Email")
End If
lcnt = lcnt + 1
rsMail.MoveNext
Loop
DoCmd.SendObject , , , , , sBCC & "; David Jackson", sSubject, vbCrLf & rsMessage("EmailMessage"), False
lcnt = 0
Loop
****** End of code
Does anyone out there have a hint of what we could or should do to make this thing work completely? If you do, we'd be happy to "see the error of our ways!!"
Thank you...... this forum is great and has saved us lots of time and aggravation. It's the best!
In our case, we only send blind copies, so that each recipient doesn't see all of the addresses the mail is sent to. Our problem is that it seems for each e-mail that is bcc'ed, we have to hit the Alt-S key combination from within Outlook to finish sending off the mail.
Here is the code we are trying to work with:
Do Until rsMail.EOF
Do Until lcnt = 100 Or rsMail.EOF
If lcnt = 0 Then
sBCC = rsMail("Email")
Else
Call SysCmd(acSysCmdSetStatus, CStr(lcnt) & " " & rsMail("Email"))
Call WriteFlatFile2("N:\Hey-Sam\WorkingOn\EmailDnrEligBy\Source\EmailDnrEligBy.Log", CStr(lcnt) & " " & rsMail("Email"))
Call WriteLogFile(CStr(lcnt) & " " & rsMail("Email"))
sBCC = sBCC & ";" & rsMail("Email")
End If
lcnt = lcnt + 1
rsMail.MoveNext
Loop
DoCmd.SendObject , , , , , sBCC & "; David Jackson", sSubject, vbCrLf & rsMessage("EmailMessage"), False
lcnt = 0
Loop
****** End of code
Does anyone out there have a hint of what we could or should do to make this thing work completely? If you do, we'd be happy to "see the error of our ways!!"
Thank you...... this forum is great and has saved us lots of time and aggravation. It's the best!