G
Guest
I have made form for E-Mail. I have entered code but the Import system does
not work. It has squiggly line underneath it showing it is not communicating.
It Will not build.
Public Class Form3Bio1
System.Net.Mail.SmtpClient
Imports System.Net.Mail ' This line before ' does not work.
I have the rest of code to try if and when I am able to get System working.
' I XXX out certain entrys below just for this publication.
Dim emailSender As SmtpClient
Dim theMessage As MailMessage
Dim SHost As String = ("smtp.XXXXX.com")
Dim Passwd As String = ("Harold45")
Dim Recv As String = ("(e-mail address removed)")
Dim Sndr As String = ("(e-mail address removed)")
Dim Body As String = (Form4Bio1.TextBox5.Text) +
(Form4Bio1.ListBox1.Items)
emailSender = New System.Net.Mail.SmtpClient( _
SHost)
theMessage = New MailMessage
theMessage.From = New MailAddress(Sndr)
theMessage.To.Add(Recv)
theMessage.Subject = (Form4Bio1.TextBox4.Text)
theMessage.password = (Passwd)
theMessage.Body = (Form4Bio1.TextBox5.Text) +
(Form4Bio1.ListBox1.Items)
I have tried Importing the System.Net.Mail but can't find it. I have .Net
2.0 installed.
My form system just does not allow System nor recognize the System.Net
Thanks for your kind help in advance. I do not know how I can get my code to
recognize Imports.System.Net.Mail.
not work. It has squiggly line underneath it showing it is not communicating.
It Will not build.
Public Class Form3Bio1
System.Net.Mail.SmtpClient
Imports System.Net.Mail ' This line before ' does not work.
I have the rest of code to try if and when I am able to get System working.
' I XXX out certain entrys below just for this publication.
Dim emailSender As SmtpClient
Dim theMessage As MailMessage
Dim SHost As String = ("smtp.XXXXX.com")
Dim Passwd As String = ("Harold45")
Dim Recv As String = ("(e-mail address removed)")
Dim Sndr As String = ("(e-mail address removed)")
Dim Body As String = (Form4Bio1.TextBox5.Text) +
(Form4Bio1.ListBox1.Items)
emailSender = New System.Net.Mail.SmtpClient( _
SHost)
theMessage = New MailMessage
theMessage.From = New MailAddress(Sndr)
theMessage.To.Add(Recv)
theMessage.Subject = (Form4Bio1.TextBox4.Text)
theMessage.password = (Passwd)
theMessage.Body = (Form4Bio1.TextBox5.Text) +
(Form4Bio1.ListBox1.Items)
I have tried Importing the System.Net.Mail but can't find it. I have .Net
2.0 installed.
My form system just does not allow System nor recognize the System.Net
Thanks for your kind help in advance. I do not know how I can get my code to
recognize Imports.System.Net.Mail.