Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. 2.0 duplicate emails

2.0 duplicate emails

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netsysadmintestingbeta-testing
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    janetb99
    wrote on last edited by
    #1

    All asp.net 2.0 email messages are duplicated. I did not have this problem in asp or asp.net 1.0 Any ideas? (server 2003, iis6, smtp enabled and working fine for 2 years) 'create the mail message Dim mail As New System.Net.Mail.MailMessage() 'set the addresses mail.From = New System.Net.Mail.MailAddress("webmaster@blah.net") mail.To.Add("yogi@blah.net") 'set the content mail.Subject = "Online Request" mail.Body = "testing" 'send the message Dim smtp As New System.Net.Mail.SmtpClient("127.0.0.1") Try smtp.Send(mail) Catch ex As Exception Dim ex2 As Exception = ex Dim errorMessage As String = String.Empty While Not (ex2 Is Nothing) errorMessage += ex2.ToString() ex2 = ex2.InnerException End While Console.WriteLine(errorMessage) End Try

    J 1 Reply Last reply
    0
    • J janetb99

      All asp.net 2.0 email messages are duplicated. I did not have this problem in asp or asp.net 1.0 Any ideas? (server 2003, iis6, smtp enabled and working fine for 2 years) 'create the mail message Dim mail As New System.Net.Mail.MailMessage() 'set the addresses mail.From = New System.Net.Mail.MailAddress("webmaster@blah.net") mail.To.Add("yogi@blah.net") 'set the content mail.Subject = "Online Request" mail.Body = "testing" 'send the message Dim smtp As New System.Net.Mail.SmtpClient("127.0.0.1") Try smtp.Send(mail) Catch ex As Exception Dim ex2 As Exception = ex Dim errorMessage As String = String.Empty While Not (ex2 Is Nothing) errorMessage += ex2.ToString() ex2 = ex2.InnerException End While Console.WriteLine(errorMessage) End Try

      J Offline
      J Offline
      janetb99
      wrote on last edited by
      #2

      In case someone else has the problem, I found the solution: My control had an onclick event, and the sub called had this: protected sub btnClick_Click(ByVal sender as object, ByVal e as EventArgs) Handles btnClick.Click ....blah email End Sub Removed the "Handles btnClick.Click" and everything works ducky now....

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups