Basically, recipients.add works fine with 1 email account (name@domain.com). As soon as I add another name to the string, separated by either a comma or a semi-colon, I get an undeliverable message. (name1@domain.com; name2@domain.com). Here's my code: (note - the function uses strecipient, but before I put a string in that variable with multiple email addresses, I'm hardcoding using "name1@domain.com" for testing purposes)
Function sendmail(strecipient As String, strisscat As String, strisstext As String)
Dim olApp As Object
Dim olNameSpace As Object
Dim olMail As Object
Set olApp = CreateObject("outlook.application")
Set olMail = olApp.CreateItem(0)
With olMail
.Subject = "Mew MDM Issue"
.Recipients.Add strecipient
.Body = "An issue has been entered into the MDM issues database: " + Chr(13) + _
" " + Chr(13) + _
"Issue Category: " + strisscat + Chr(13) + _
"Issue Text: " + strisstext
.Send
End With
End Function
Function sendmail(strecipient As String, strisscat As String, strisstext As String)
Dim olApp As Object
Dim olNameSpace As Object
Dim olMail As Object
Set olApp = CreateObject("outlook.application")
Set olMail = olApp.CreateItem(0)
With olMail
.Subject = "Mew MDM Issue"
.Recipients.Add strecipient
.Body = "An issue has been entered into the MDM issues database: " + Chr(13) + _
" " + Chr(13) + _
"Issue Category: " + strisscat + Chr(13) + _
"Issue Text: " + strisstext
.Send
End With
End Function