Difference between revisions of "ASP.NET Mail"
From KOP KB
(Created page with "= Comparing strings to avoid email issues = dim str1 As String = txtReceiptEmail.Text.ToString() dim str2 As String = "" if String.Compare(str1, str2) = 0 Then message = Ne...") |
|||
Line 1: | Line 1: | ||
= Comparing strings to avoid email issues = | = Comparing strings to avoid email issues = | ||
+ | <syntaxhighlight lang="vbnet"> | ||
dim str1 As String = txtReceiptEmail.Text.ToString() | dim str1 As String = txtReceiptEmail.Text.ToString() | ||
dim str2 As String = "" | dim str2 As String = "" | ||
Line 9: | Line 10: | ||
message = New System.Net.Mail.MailMessage("[email protected]", txtReceiptEmail.Text) | message = New System.Net.Mail.MailMessage("[email protected]", txtReceiptEmail.Text) | ||
end if | end if | ||
+ | </syntaxhighlight> |
Revision as of 18:22, 16 October 2015
Comparing strings to avoid email issues
dim str1 As String = txtReceiptEmail.Text.ToString()
dim str2 As String = ""
if String.Compare(str1, str2) = 0 Then
message = New System.Net.Mail.MailMessage("[email protected]", "[email protected]")
else
message = New System.Net.Mail.MailMessage("[email protected]", txtReceiptEmail.Text)
end if