0

I want to have a TextBox where the user can enter in emails and these emails can be passed to an SMTP function where it is added to the message as a CC. I'm using the below code to try and add a ; in between each email before it is passed to the function. The problem is, it doesn't work. It also doesn't throw any errors. Can anyone tell me what I am doing wrong. If any other info is needed please let me know also. Thanks.


Dim mcc As String

Dim cccopy As String

mcc = nvarP7copy.Text.ToString


If mcc <> "" Or mcc <> String.Empty Then

Dim strCC() As String = Split(mcc, ";")Dim strThisCC As String
cccopy = Trim(strThisCC)

For Each strThisCC In strCC


Next

End If

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by hollyadams
0

Sorry the code should look like this:

Dim mcc As String

Dim cccopy As String

mcc = nvarP7copy.Text.ToString


If mcc <> "" Or mcc <> String.Empty Then

Dim strCC() As String = Split(mcc, ";")
Dim strThisCC As String

For Each strThisCC In strCC
cccopy = Trim(strThisCC)
Next

End If

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.