Merry Christmas to all, hope you have a nice holiday!
I use the SendObject method to perform a periodic email to several email recipients. The email addresses are compiled through a loop statement, the message is created and an attachment is emailed.
The odd thing is, for one particular batch of recipients, I get the following error message from MS Outlook. But with all other batches of recipients, the email works great. I'm not sure if this is a Access problem or an Outlook problem.
So here is a code snippet;
Dim strReport As String
Dim strEmail As String
Dim strSubject As String
Dim strMessage As String
strReport = "RptScheduleMain_Project" 'name of report
strEmail = ProjectEmail(Me.ProjectID) 'function to compile a string of email addresses
strSubject = "Schedule"
strMessage = "Hello World "
DoCmd.SendObject acSendReport, strReport, acFormatPDF, strEmail, , , strSubject, strMessage, False
The snotty gram I get from Outlook is:
"Unknown message recipient; the message was not sent"
I can send email to these same folks without any problems. I can leave the strEmail string blank and input the email addresses manually without any problems.
Any thoughts/suggestions?