i write code for sending mail to client's given email addresses.
But Im getting following error message
The SMTP server requires a secure connection or the client was not authenticated. The server response was: dnsgem.org ESMTP MailEnable Service, Version: 0--2.53 denied access at 09/30/09 08:49:39
this is the code i written for sending mail
I don't know where i made mistake.
this is the url for
http://kitseducation.n et/innerpages/enquiry.aspx,
Please give me solution for the above problem
Thanks In Advance.
But Im getting following error message
The SMTP server requires a secure connection or the client was not authenticated. The server response was: dnsgem.org ESMTP MailEnable Service, Version: 0--2.53 denied access at 09/30/09 08:49:39
this is the code i written for sending mail
Code:
Public Sub SendMail(ByVal Efrom As String, ByVal EReceiver As String, ByVal subject As String, ByVal body As String, ByVal attachmentFileName As String)
Try
Dim ToAddress As String
ToAddress = "kitsinda@gmail.com"
Dim Msg1 As New MailMessage(Efrom, ToAddress)
Msg1.Subject = subject
Msg1.Body = body
Msg1.Priority = MailPriority.Normal
Msg1.IsBodyHtml = True
If (attachmentFileName <> "") Then
Msg1.Attachments.Add(New Attachment(attachmentFileName))
End If
Dim client1 As New SmtpClient(SMTPSERVER, 25)
client1.Credentials = New System.Net.NetworkCredential(Me.MailUsername, Me.MailPassword)
client1.Send(Msg1)
Catch ex As SmtpException
Throw New Exception(ex.Message)
Finally
End Try
End Sub
this is the url for
http://kitseducation.n et/innerpages/enquiry.aspx,
Please give me solution for the above problem
Thanks In Advance.
Comment