Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region "EMailHandlers"
- '=============================================================================================================
- ' EMail Claims Pack to customer
- '=============================================================================================================
- Protected Sub BTNSendPack_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTNSendPack.Click
- '=== Check the files have already been created for this ClaimID
- If File.Exists(Server.MapPath("UploadedFiles\") & TBClaimRef.Text & "\ClaimPack.doc") Then
- '=== Get the Customers details for this ClaimID
- Dim Claim As ClaimsDB = New ClaimsDB
- Dim CustomerDetails As CustomerDetails
- Dim ClaimDetails As ClaimDetails
- Dim ToAddress As String = ""
- If TBClaimRef.Text <> "" Then
- CustomerDetails = Claim.GetCustomerDetails(TBClaimRef.Text)
- ClaimDetails = Claim.GetDetails(TBClaimRef.Text)
- ToAddress = CustomerDetails.EMailAddress
- End If
- '=== Check we have an e-mail address
- If ToAddress = "" Then
- LBLMessage.Text = "You cannot email the claims pack as no e-mail address is stored for the customer."
- Exit Sub
- End If
- '=== Create the email
- Dim FromAddress As String = "info@totalcareltd.com"
- Dim Subject As String = "Important Information From TOTAL CARE"
- Dim Body As String = "Dear " & CustomerDetails.Title & " " & CustomerDetails.Surname & " " & CustomerDetails.OtherTitle & " " & CustomerDetails.OtherSurname & "<br /><br />"
- If ClaimDetails.ClaimTypeID = 6 Then
- Body &= "Thank you for contacting Total Care to reclaim your mis-sold Payment Protection Insurance.<br /><br />"
- Body &= "Please find attached your introduction letter, form of authority, questionnaire and Terms and Conditions of Business.<br />"
- Body &= "To enable us to proceed with your claim please download, print and complete the form of authority and questionnaire and return to us.<br /><br />"
- Body &= "If you don’t have the facility to download and/or print the pack, please do not hesitate to reply to this e mail and we will post a pack to you.<br /><br />"
- Body &= "If you have any questions, please do not hesitate to reply to this mail or call us on 03301 11 33 77.<br /><br />"
- Body &= "We look forward to reclaiming your mis-sold Payment Protection Insurance for you.<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Body &= "PS. Please remember, we can also claim back unfair charges raised on credit cards, loans and mortgages!!"
- ElseIf ClaimDetails.ClaimTypeID = 9 Then
- Body &= "Thank you for contacting Total Care to assess your credit agreement.<br /><br />"
- Body &= "Please find attached your introduction letter, form of authority and our Terms and Conditions of business.<br />"
- Body &= "To enable us to assess your agreement to see if it can be classed as ‘unenforceable’, please download, print, complete the form of authority and send it back to us.<br /><br />"
- Body &= "If you don’t have the facility to download and/or print the pack, please do not hesitate to reply to this e mail and we will post a pack to you.<br /><br />"
- Body &= "If you have any questions, please do not hesitate to reply to this mail or call us on 03301 11 33 77.<br /><br />"
- Body &= "We look forward to receiving your signed Form of Authority to start your claim!<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Body &= "PS. Please remember, we can also claim back unfair charges raised on credit cards, loans and mortgages!!"
- ElseIf ClaimDetails.ClaimTypeID = 11 Then
- Body &= "Thank you for contacting Total Care to assess your mortgage agreement.<br /><br />"
- Body &= "Please find attached your introduction letter, form of authority and our Terms and Conditions of business.<br />"
- Body &= "To enable us to assess your agreement to see if it can be classed as ‘unenforceable’, please download, print, complete the form of authority and send it back to us with the application fee.<br /><br />"
- Body &= "If you don’t have the facility to download and/or print the pack, please do not hesitate to reply to this e mail and we will post a pack to you.<br /><br />"
- Body &= "If you have any questions, please do not hesitate to reply to this mail or call us on 03301 11 33 77.<br /><br />"
- Body &= "We look forward to receiving your signed Form of Authority to start your claim!<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Body &= "PS. Please remember, we can also claim back unfair charges raised on credit cards, loans and mortgages!!"
- Else
- Body &= "Thank you for contacting Total Care to reclaim your unfair finance charges.<br /><br />"
- Body &= "Please find attached your introduction letter, forms of authority and our Terms and Conditions of business.<br />"
- Body &= "To enable us to proceed with your claim please download, print and complete the form of authority and send it back to us.<br /><br />"
- Body &= "If you don’t have the facility to download and/or print the pack, please do not hesitate to reply to this e mail and we will post a pack to you.<br /><br />"
- Body &= "If you have any questions, please do not hesitate to reply to this mail or call us on 03301 11 33 77.<br /><br />"
- Body &= "We look forward to reclaiming your charges for you!<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Body &= "PS. Please remember, we can also claim back unfair charges raised on credit cards, loans and mortgages!!"
- End If
- Dim EMail As New MailMessage(FromAddress, ToAddress, Subject, Body)
- EMail.IsBodyHtml = True
- '=== add attachments to email
- 'EMail.Attachments.Add(New Attachment(Server.MapPath("UploadedFiles\") & TBClaimRef.Text & "\TermsOfBusiness.pdf"))
- EMail.Attachments.Add(New Attachment(Server.MapPath("UploadedFiles\") & TBClaimRef.Text & "\ClaimPack.doc"))
- '=== Send the email (smtp server details held in system.net section of web config)
- Try
- Dim Smtp As New SmtpClient
- Smtp.Send(EMail)
- '=== Notify User
- LBLMessage.Text = "Sucessfully sent claims pack e-mail."
- Catch ex As SmtpFailedRecipientException
- LBLMessage.Text = "Failed to send claims pack e-mail (smtp recipients exception): "
- LBLMessage.Text &= ex.StatusCode.ToString
- Catch ex As SmtpException
- LBLMessage.Text = "Failed to send claims pack e-mail (smtp exception): "
- LBLMessage.Text &= ex.StatusCode.ToString & " : "
- LBLMessage.Text &= ex.InnerException.Message.ToString
- Catch ex As Exception
- LBLMessage.Text = "Failed to send claims pack e-mail (general exception): "
- LBLMessage.Text &= (ex.Message.ToString & "<br />")
- End Try
- Else
- LBLMessage.Text = "Please create the claims pack documents before trying to e-mail them."
- End If
- End Sub
- Protected Sub BTNSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTNSend.Click
- '=== Get the Customers details for this ClaimID
- Dim Claim As ClaimsDB = New ClaimsDB
- Dim ClaimDetails As ClaimDetails
- Dim CustomerDetails As CustomerDetails
- Dim ToAddress As String = ""
- If TBClaimRef.Text <> "" Then
- CustomerDetails = Claim.GetCustomerDetails(TBClaimRef.Text)
- ClaimDetails = Claim.GetDetails(TBClaimRef.Text)
- ToAddress = CustomerDetails.EMailAddress
- End If
- '=== Check we have an e-mail address
- If ToAddress = "" Then
- LBLMessage.Text = "You cannot email an update as no e-mail address is stored for the customer."
- Exit Sub
- End If
- '=== Create the email
- Dim FromAddress As String = "info@totalcareltd.com"
- Dim Subject As String = "Important Information From TOTAL CARE"
- Dim Body As String = "Dear " & CustomerDetails.Title & " " & CustomerDetails.Surname & " " & CustomerDetails.OtherTitle & " " & CustomerDetails.OtherSurname & "<br /><br />"
- If DDLClaimTypeID.SelectedValue = 9 Then
- Body &= "Thank you for contacting Total Care to assess your credit agreement to see if it is fair.<br />"
- Body &= "We are pleased to confirm that your copy credit agreement has arrived from " & Claim.GetBankName(ClaimDetails.BankID) & " today.<br /><br />"
- Body &= "These have been passed to our vetting team.<br /><br />"
- Body &= "They will carefully check the documents and advise you within the next 28 days what we can do for you next.<br /><br />"
- Body &= "If you have any further questions, please do not hesitate to call us on 03301 11 33 77 or click reply to this e mail.<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Body &= "PS. Remember, we can also help you manage your finances if you are struggling. Speak to one of our helpful advisors today!<br />"
- End If
- Dim EMail As New MailMessage(FromAddress, ToAddress, Subject, Body)
- EMail.IsBodyHtml = True
- '=== Send the email (smtp server details held in system.net section of web config)
- Try
- Dim Smtp As New SmtpClient
- Smtp.Send(EMail)
- '=== Notify User
- LBLMessage.Text = "Sucessfully sent e-mail."
- Catch ex As SmtpFailedRecipientException
- LBLMessage.Text = "Failed to send e-mail (smtp recipients exception): "
- LBLMessage.Text &= ex.StatusCode.ToString
- Catch ex As SmtpException
- LBLMessage.Text = "Failed to send e-mail (smtp exception): "
- LBLMessage.Text &= ex.StatusCode.ToString & " : "
- LBLMessage.Text &= ex.InnerException.Message.ToString
- Catch ex As Exception
- LBLMessage.Text = "Failed to send e-mail (general exception): "
- LBLMessage.Text &= (ex.Message.ToString & "<br />")
- End Try
- End Sub
- Protected Sub BTNSendDefLetSentLender_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTNSendDefLetSentLender.Click
- '=== Get the Customers details for this ClaimID
- Dim Claim As ClaimsDB = New ClaimsDB
- Dim ClaimDetails As ClaimDetails
- Dim CustomerDetails As CustomerDetails
- Dim ToAddress As String = ""
- If TBClaimRef.Text <> "" Then
- CustomerDetails = Claim.GetCustomerDetails(TBClaimRef.Text)
- ClaimDetails = Claim.GetDetails(TBClaimRef.Text)
- ToAddress = CustomerDetails.EMailAddress
- End If
- '=== Check we have an e-mail address
- If ToAddress = "" Then
- LBLMessage.Text = "You cannot email an update as no e-mail address is stored for the customer."
- Exit Sub
- End If
- '=== Create the email
- Dim FromAddress As String = "info@totalcareltd.com"
- Dim Subject As String = "Important Information From TOTAL CARE"
- Dim Body As String = "Dear " & CustomerDetails.Title & " " & CustomerDetails.Surname & " " & CustomerDetails.OtherTitle & " " & CustomerDetails.OtherSurname & "<br /><br />"
- If DDLClaimTypeID.SelectedValue = 9 Then
- Body &= "Thank you for contacting Total Care to assess your credit agreement to see if it is fair.<br />"
- Body &= "Unfortunately, we have not received a response from your Lender within the legal timeframe of four weeks.<br /><br />"
- Body &= "We have therefore sent a ‘Default Notice’ to your Lender.<br />"
- Body &= "This gives them 14 days to provide a copy of your credit agreement.<br /><br />"
- Body &= "We have diaried your claim for 21 days from today. This gives the Lender time for our Default Notice to arrive, for them to prepare a response and for it to be posted back to us.<br /><br />"
- Body &= "Once the 21 days has expired, if we have not received the copy of your credit agreement from your Lender, we will contact you again to explain what happens next.<br /><br />"
- Body &= "If you have any further questions, please do not hesitate to call us on 03301 11 33 77 or click reply to this e mail.<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Body &= "PS. Remember, we can also help you manage your finances if you are struggling. Speak to one of our helpful advisors today!<br />"
- End If
- Dim EMail As New MailMessage(FromAddress, ToAddress, Subject, Body)
- EMail.IsBodyHtml = True
- '=== Send the email (smtp server details held in system.net section of web config)
- Try
- Dim Smtp As New SmtpClient
- Smtp.Send(EMail)
- '=== Notify User
- LBLMessage.Text = "Sucessfully sent e-mail."
- Catch ex As SmtpFailedRecipientException
- LBLMessage.Text = "Failed to send e-mail (smtp recipients exception): "
- LBLMessage.Text &= ex.StatusCode.ToString
- Catch ex As SmtpException
- LBLMessage.Text = "Failed to send e-mail (smtp exception): "
- LBLMessage.Text &= ex.StatusCode.ToString & " : "
- LBLMessage.Text &= ex.InnerException.Message.ToString
- Catch ex As Exception
- LBLMessage.Text = "Failed to send e-mail (general exception): "
- LBLMessage.Text &= (ex.Message.ToString & "<br />")
- End Try
- End Sub
- Protected Sub BTNSendFOARecd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTNSendFOARecd.Click
- '=== Get the Customers details for this ClaimID
- Dim Claim As ClaimsDB = New ClaimsDB
- Dim ClaimDetails As ClaimDetails
- Dim CustomerDetails As CustomerDetails
- Dim ToAddress As String = ""
- If TBClaimRef.Text <> "" Then
- CustomerDetails = Claim.GetCustomerDetails(TBClaimRef.Text)
- ClaimDetails = Claim.GetDetails(TBClaimRef.Text)
- ToAddress = CustomerDetails.EMailAddress
- End If
- '=== Check we have an e-mail address
- If ToAddress = "" Then
- LBLMessage.Text = "You cannot email an update as no e-mail address is stored for the customer."
- Exit Sub
- End If
- '=== Create the email
- Dim FromAddress As String = "info@totalcareltd.com"
- Dim Subject As String = "Important Information From TOTAL CARE"
- Dim Body As String = "Dear " & CustomerDetails.Title & " " & CustomerDetails.Surname & " " & CustomerDetails.OtherTitle & " " & CustomerDetails.OtherSurname & "<br /><br />"
- If DDLClaimTypeID.SelectedValue = 3 Or DDLClaimTypeID.SelectedValue = 4 Or DDLClaimTypeID.SelectedValue = 5 Then
- Body &= "Thank you for contacting Total Care to reclaim your unfair charges.<br />"
- Body &= "We are pleased to confirm that your signed Form of Authority has arrived.<br /><br />"
- Body &= "This has been processed to " & Claim.GetBankName(ClaimDetails.BankID) & " today.<br /><br />"
- Body &= "By Law they have up to eight weeks to produce and send copy statements to us.<br />"
- Body &= "In some circumstances they will send the copy statements to you. If this happens, please call us to tell us.<br />"
- Body &= "As soon as we have received the copy statements we will contact you with an update again.<br />"
- Body &= "If you have any further questions, please do not hesitate to call us on 03301 11 33 77 or click reply to this e mail.<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Body &= "PS. Remember, we can also help you manage your finances if you are struggling. Speak to one of our helpful advisors today!<br />"
- ElseIf DDLClaimTypeID.SelectedValue = 6 Then
- Body &= "Thank you for contacting Total Care to reclaim your ‘mis-sold’ payment protection insurance.<br />"
- Body &= "We are pleased to confirm that your signed Form of Authority and questionnaire has arrived.<br /><br />"
- Body &= "This has been processed to " & Claim.GetBankName(ClaimDetails.BankID) & " today.<br /><br />"
- Body &= "By Law they have up to eight weeks to respond to the complaint.<br />"
- Body &= "In some circumstances they will write directly to you. If this happens, please call us to tell us.<br />"
- Body &= "As soon as we have received communication from them, or the eight week time limit has expired, we will contact you with an update again.<br />"
- Body &= "If you have any further questions, please do not hesitate to call us on 03301 11 33 77 or click reply to this e mail.<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Body &= "PS. Remember, we can also help you manage your finances if you are struggling. Speak to one of our helpful advisors today!<br />"
- ElseIf DDLClaimTypeID.SelectedValue = 9 Then
- Body &= "Thank you for contacting Total Care to assess your credit agreement to see if it is fair.<br />"
- Body &= "We are pleased to confirm that your signed Form of Authority has arrived.<br /><br />"
- Body &= "This has been processed to " & Claim.GetBankName(ClaimDetails.BankID) & " today.<br /><br />"
- Body &= "By Law they have up to four weeks to produce and send a copy of your credit agreement to us.<br />"
- Body &= "In some circumstances they will write directly to you. If this happens, please call us to tell us.<br />"
- Body &= "As soon as we have received the copy agreement or the four weeks time limit has elapsed, we will contact you with an update again.<br />"
- Body &= "If you have any further questions, please do not hesitate to call us on 03301 11 33 77 or click reply to this e mail.<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Body &= "PS. Remember, we can also help you manage your finances if you are struggling. Speak to one of our helpful advisors today!<br />"
- End If
- Dim EMail As New MailMessage(FromAddress, ToAddress, Subject, Body)
- EMail.IsBodyHtml = True
- '=== Send the email (smtp server details held in system.net section of web config)
- Try
- Dim Smtp As New SmtpClient
- Smtp.Send(EMail)
- '=== Notify User
- LBLMessage.Text = "Sucessfully sent e-mail."
- Catch ex As SmtpFailedRecipientException
- LBLMessage.Text = "Failed to send e-mail (smtp recipients exception): "
- LBLMessage.Text &= ex.StatusCode.ToString
- Catch ex As SmtpException
- LBLMessage.Text = "Failed to send e-mail (smtp exception): "
- LBLMessage.Text &= ex.StatusCode.ToString & " : "
- LBLMessage.Text &= ex.InnerException.Message.ToString
- Catch ex As Exception
- LBLMessage.Text = "Failed to send e-mail (general exception): "
- LBLMessage.Text &= (ex.Message.ToString & "<br />")
- End Try
- End Sub
- Protected Sub BTNSendStatementsRecdLender_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTNSendStatementsRecdLender.Click
- End Sub
- Protected Sub BTNPackReceivedEmailUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTNPackReceivedEmailUpdate.Click
- '=== Get the Customers details for this ClaimID
- Dim Claim As ClaimsDB = New ClaimsDB
- Dim ClaimDetails As ClaimDetails
- Dim CustomerDetails As CustomerDetails
- Dim ToAddress As String = ""
- If TBClaimRef.Text <> "" Then
- CustomerDetails = Claim.GetCustomerDetails(TBClaimRef.Text)
- ClaimDetails = Claim.GetDetails(TBClaimRef.Text)
- ToAddress = CustomerDetails.EMailAddress
- End If
- '=== Check we have an e-mail address
- If ToAddress = "" Then
- LBLMessage.Text = "You cannot email an update as no e-mail address is stored for the customer."
- Exit Sub
- End If
- '=== Create the email
- Dim FromAddress As String = "info@totalcareltd.com"
- Dim Subject As String = "Important Information From TOTAL CARE"
- Dim Body As String = "Dear " & CustomerDetails.Title & " " & CustomerDetails.Surname & " " & CustomerDetails.OtherTitle & " " & CustomerDetails.OtherSurname & "<br /><br />"
- If ClaimDetails.ClaimTypeID = 11 Then
- Body &= "<b>AN UPDATE ON YOUR MISSOLD MORTGAGE CLAIM</b><br /><br />"
- Body &= "Thank you for contacting Total Care.<br /><br />"
- Body &= "We are pleased to confirm we have received your signed Form of Authority and application fee.<br /><br />"
- Body &= "We have processed this to your Lender today.<br /><br />"
- Body &= "By Law, your Lender has eight weeks to produce the necessary documents we require and send them to us.<br /><br />"
- Body &= "<b>Please remember-if your Lender sends any documents to you, or any correspondence regarding the claim, please ensure this is forwarded to us as soon as it is received.</b><br /><br />"
- Body &= "Once we have received your documents we will contact you again to confirm what will happen next.<br /><br />"
- Body &= "If you have any further questions, please do not hesitate to call us on 03301 11 33 77 or click reply to this e mail.<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Else
- Body &= "<b>AN UPDATE ON YOUR CLAIM</b><br /><br />"
- Body &= "Thank you for contacting Total Care.<br /><br />"
- Body &= "We are pleased to confirm we have received your signed Form of Authority.<br /><br />"
- Body &= "We have processed this to your Lender today.<br /><br />"
- Body &= "By Law, your Lender has eight weeks to produce the necessary documents we require and send them to us.<br /><br />"
- Body &= "<b>Please remember-if your Lender sends any documents to you, or any correspondence regarding the claim, please ensure this is forwarded to us as soon as it is received.</b><br /><br />"
- Body &= "Once we have received your documents we will contact you again to confirm what will happen next.<br /><br />"
- Body &= "If you have any further questions, please do not hesitate to call us on 03301 11 33 77 or click reply to this e mail.<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- End If
- Dim EMail As New MailMessage(FromAddress, ToAddress, Subject, Body)
- EMail.IsBodyHtml = True
- '=== Send the email (smtp server details held in system.net section of web config)
- Try
- Dim Smtp As New SmtpClient
- Smtp.Send(EMail)
- '=== Notify User
- LBLMessage.Text = "Sucessfully sent e-mail."
- Catch ex As SmtpFailedRecipientException
- LBLMessage.Text = "Failed to send e-mail (smtp recipients exception): "
- LBLMessage.Text &= ex.StatusCode.ToString
- Catch ex As SmtpException
- LBLMessage.Text = "Failed to send e-mail (smtp exception): "
- LBLMessage.Text &= ex.StatusCode.ToString & " : "
- LBLMessage.Text &= ex.InnerException.Message.ToString
- Catch ex As Exception
- LBLMessage.Text = "Failed to send e-mail (general exception): "
- LBLMessage.Text &= (ex.Message.ToString & "<br />")
- End Try
- End Sub
- Protected Sub BTNStatementReceivedEmailUpdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTNStatementReceivedEmailUpdate.Click
- '=== Get the Customers details for this ClaimID
- Dim Claim As ClaimsDB = New ClaimsDB
- Dim CustomerDetails As CustomerDetails
- Dim ToAddress As String = ""
- If TBClaimRef.Text <> "" Then
- CustomerDetails = Claim.GetCustomerDetails(TBClaimRef.Text)
- ToAddress = CustomerDetails.EMailAddress
- End If
- '=== Check we have an e-mail address
- If ToAddress = "" Then
- LBLMessage.Text = "You cannot email an update as no e-mail address is stored for the customer."
- Exit Sub
- End If
- '=== Create the email
- Dim FromAddress As String = "info@totalcareltd.com"
- Dim Subject As String = "Important Information From TOTAL CARE"
- Dim Body As String = "Dear " & CustomerDetails.Title & " " & CustomerDetails.Surname & " " & CustomerDetails.OtherTitle & " " & CustomerDetails.OtherSurname & "<br /><br />"
- Body &= "<b>AN UPDATE ON YOUR CLAIM</b><br /><br />"
- Body &= "We are pleased to confirm the necessary documents have arrived from your Lender.<br /><br />"
- Body &= "These have been passed to our processing team who will write to you/e mail you within the next 28 days to advise the next steps.<br /><br />"
- Body &= "In the meantime, if you require any further information, do not hesitate to click reply to this e mail or call 03301 11 33 77.<br /><br />"
- Body &= "Kind Regards<br /><br />"
- Body &= "Total Care<br /><br />"
- Body &= "Total Care Compensation Specialists Limited<br />"
- Body &= "119a Bury Old Road, Whitefield, Manchester, M45 7AY<br /><br />"
- Dim EMail As New MailMessage(FromAddress, ToAddress, Subject, Body)
- EMail.IsBodyHtml = True
- '=== Send the email (smtp server details held in system.net section of web config)
- Try
- Dim Smtp As New SmtpClient
- Smtp.Send(EMail)
- '=== Notify User
- LBLMessage.Text = "Sucessfully sent e-mail."
- Catch ex As SmtpFailedRecipientException
- LBLMessage.Text = "Failed to send e-mail (smtp recipients exception): "
- LBLMessage.Text &= ex.StatusCode.ToString
- Catch ex As SmtpException
- LBLMessage.Text = "Failed to send e-mail (smtp exception): "
- LBLMessage.Text &= ex.StatusCode.ToString & " : "
- LBLMessage.Text &= ex.InnerException.Message.ToString
- Catch ex As Exception
- LBLMessage.Text = "Failed to pack e-mail (general exception): "
- LBLMessage.Text &= (ex.Message.ToString & "<br />")
- End Try
- End Sub
- #End Region
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement