|
-
Jan 12th, 2008, 12:48 AM
#1
Thread Starter
Member
[Resolved][2005] The specified e-mail address is currently not supported.
i am trying to send an email to 1 or more persons and when i get to mail.To.Add(TextBox6.Text) i get the following error. any help will be great
thanks in advance.
The specified e-mail address is currently not supported.
here is the code i am using
Imports System.Net.Mail
Imports System.Net
Dim j As Long
TextBox5.Text = ""
Dim mail As New Net.Mail.MailMessage()
For j = 1 To ListView1.CheckedItems.Count.ToString
TextBox6.Text = ListView1.CheckedItems(0).ToString
'etc to include all subitems so the entire row is moved
mail.From = New Net.Mail.MailAddress("[email protected]")
error here mail.To.Add(TextBox6.Text)
mail.Subject = TextBox1.Text
mail.Body = TextBox2.Text & vbCrLf & TextBox3.Text
TextBox5.Text = "Email Sent To " & TextBox6.Text
'If TextBox4.Text <> "" Then
mail.Attachments.Add(New System.Net.Mail.Attachment(TextBox4.Text))
'End If
Dim smtp As New Net.Mail.SmtpClient("192.168.101.10")
'smtp.Timeout = 30 * 1000 ' Milliseconds
smtp.Send(mail)
Next j
TextBox5.Text = "Finished"
Last edited by computerguy46; Jan 16th, 2008 at 10:46 AM.
Reason: resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|