Public Function SendMailToDept(ByVal Fromm As String, ByVal Recipient As String, ByVal Cc As String, ByVal Subject As String, ByVal Body As String) As Boolean 'Sending Mail to multiple pepople coading by (Abhishek singh)abhishek_singh156@yahoo.com Dim mailstatus As Boolean = False Try ' Create a New blank MailMessage */ Dim mailMessage As MailMessage = New MailMessage() mailMessage.From = Fromm mailMessage.To = Recipient mailMessage.Cc = Cc 'mailMessage.Bcc = txtBcc.Text; mailMessage.Subject = Subject mailMessage.Body = Body mailMessage.BodyFormat = MailFormat.Html SmtpMail.SmtpServer = "144.1.14.3" (your server path) SmtpMail.Send(mailMessage) mailstatus = True Catch ex As Exception mailstatus = False End Try Return mailstatus End Function Public button_click()--------- Dim subjectmail, strreason as string subjectmail = "Please chek this mail" strreason="Error comes" Dim strmail as string strmail = SendMailToDept(abhisheksingh156@yahoo.com, abhishek_singh156@yahoo.com, abhisheksingh156@gmail.com, subjectmail, strreason) End Sub Thanks & Regards Abhishek Singh TATA STEEL(ITS) Livelihood system abhishek_singh156@yahoo.com 09709109796
A
abhisheksingh156
@abhisheksingh156