Private Sub SendEmail()
Dim Mail As New MailMessage
Try
Mail.IsBodyHtml = True
Dim MailText As String = Nothing
Mail.Subject = " Report Submitted By : " & Session("LoggedInUserFullName") & " " & "User Type :" & GetUserTypeName(CInt(Session("UserTypes")))
MailText = MailText + "" & "Dear User, " & "
" & Environment.NewLine
" & Environment.NewLine
MailText = MailText + "" + " " & "we are glad to inform you that your records has accepted." & "
""
" + AcceptComments & """ " + Environment.NewLine
""
" + AcceptComments & """ " + Environment.NewLine
MailText = MailText + "
" & " Regards," & " " & "
" & "Plan Pakistan RBME TEAM" + "" & vbCrLf
" & " Regards," & " " & "
" & "Plan Pakistan RBME TEAM" + "" & vbCrLf
Mail.IsBodyHtml = True
Mail.Body = MailText
Dim files As List(Of HttpPostedFile) = DirectCast(Cache(Me.Key), List(Of HttpPostedFile))
For Each file As HttpPostedFile In files
Mail.Attachments.Add(New Attachment(file.InputStream, Path.GetFileName(file.FileName), file.ContentType))
Next
Mail.To.Add(GetUserIDEmail(ddlusers.SelectedValue))
Mail.From = New MailAddress("[email protected]")
Dim smtp As New SmtpClient("venus.hostingmadeeasy.com")
smtp.EnableSsl = False
smtp.Credentials = New System.Net.NetworkCredential("[email protected]", "pakistan")
smtp.Port = 25
smtp.Send(Mail)
Catch ex As Exception
ex.Message.ToString()
End Try
End Sub
Mark TaborPosted Jul 26, 2016, 3:23 AM
Nilesh SawardekarPosted Jul 26, 2016, 3:16 AM
Mark TaborPosted Jul 26, 2016, 3:13 AM
Nilesh SawardekarI did not checked that how to check without application ?
Nilesh SawardekarPosted Jul 26, 2016, 3:11 AM
Mark TaborPosted Jul 26, 2016, 3:04 AM
"{"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 202.165.228.15:2525"}"
Mark TaborPosted Jul 26, 2016, 3:00 AM
Nilesh SawardekarPosted Jul 26, 2016, 2:48 AM