[code=vb]
'server address
Dim client As New SmtpClient("ima p.uk.aol.com", 143)
'username and password
client.Credenti als = New Net.NetworkCred ential("my username", "mypassword ")
Dim mm As New MailMessage("my emailaddress@ao l.com", "otheremailaddr ess@somewhere.c o.uk")
'Set Subject
mm.Subject = "Test"
'set message
mm.Body = "Test123"
'html???
mm.IsBodyHtml = False
'send email
Try
client.Send(mm)
'give error if any
Catch ex As Exception
'display error message
MessageBox.Show (ex.ToString)
End Try
[/code]
please look at the error message attached and help i dont no what this even means.
thanks
Hi if you cant read the attached file...
[code=text]
System.Net.Mail .SmtpException: Failure sending mail. ---> System.FormatEx ception: Smtp server returned an invalid response.
at System.Net.Mail .SmtpReplyReade rFactory.Proces sRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)
at System.Net.Mail .SmtpReplyReade rFactory.ReadLi nes(SmtpReplyRe ader caller, Boolean oneLine)
at System.Net.Mail .SmtpReplyReade rFactory.ReadLi ne(SmtpReplyRea der caller)
at System.Net.Mail .SmtpReplyReade r.ReadLine()
at System.Net.Mail .SmtpConnection .GetConnection( String host, Int32 port)
at System.Net.Mail .SmtpTransport. GetConnection(S tring host, Int32 port)
at System.Net.Mail .SmtpClient.Get Connection()
at System.Net.Mail .SmtpClient.Sen d(MailMessage message)
--- End of inner exception stack trace ---
at System.Net.Mail .SmtpClient.Sen d(MailMessage message)
at Email.Form1.ema il1() in C:\Documents and Settings\Datadi ssUser\My Documents\Visua l Studio 2005\Projects\E mail\Email\Form 1.vb:line 28[/code]
'server address
Dim client As New SmtpClient("ima p.uk.aol.com", 143)
'username and password
client.Credenti als = New Net.NetworkCred ential("my username", "mypassword ")
Dim mm As New MailMessage("my emailaddress@ao l.com", "otheremailaddr ess@somewhere.c o.uk")
'Set Subject
mm.Subject = "Test"
'set message
mm.Body = "Test123"
'html???
mm.IsBodyHtml = False
'send email
Try
client.Send(mm)
'give error if any
Catch ex As Exception
'display error message
MessageBox.Show (ex.ToString)
End Try
[/code]
please look at the error message attached and help i dont no what this even means.
thanks
Hi if you cant read the attached file...
[code=text]
System.Net.Mail .SmtpException: Failure sending mail. ---> System.FormatEx ception: Smtp server returned an invalid response.
at System.Net.Mail .SmtpReplyReade rFactory.Proces sRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)
at System.Net.Mail .SmtpReplyReade rFactory.ReadLi nes(SmtpReplyRe ader caller, Boolean oneLine)
at System.Net.Mail .SmtpReplyReade rFactory.ReadLi ne(SmtpReplyRea der caller)
at System.Net.Mail .SmtpReplyReade r.ReadLine()
at System.Net.Mail .SmtpConnection .GetConnection( String host, Int32 port)
at System.Net.Mail .SmtpTransport. GetConnection(S tring host, Int32 port)
at System.Net.Mail .SmtpClient.Get Connection()
at System.Net.Mail .SmtpClient.Sen d(MailMessage message)
--- End of inner exception stack trace ---
at System.Net.Mail .SmtpClient.Sen d(MailMessage message)
at Email.Form1.ema il1() in C:\Documents and Settings\Datadi ssUser\My Documents\Visua l Studio 2005\Projects\E mail\Email\Form 1.vb:line 28[/code]
Comment