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
  1. Home
  2. General Programming
  3. Visual Basic
  4. [VB.NET 2010] Sending mail only works sometimes

[VB.NET 2010] Sending mail only works sometimes

Scheduled Pinned Locked Moved Visual Basic
csharpsharepointsysadminhelp
35 Posts 19 Posters 1 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.
  • T The Mighty Atom

    Meh, im really lost now. What to do? Keep trying and use the code others kindly provided in the thread, or drop bug reporting via email completely and try http/web service instead. I don't know anything about http servers and web services so yes, a sample would be nice. Also, i don't feel like adding my username and password into my code as it can be retrieved from the compiled exe. :confused:

    Virtual Space Shuttle Astronaut

    M Offline
    M Offline
    Michel Godfroid
    wrote on last edited by
    #26

    Forget the email. You're (incorrectly) assuming that all your users have access to an unprotected smtp server, and that they have configured this server correctly. This will not be true: - in corporate environments, where exchange or lotus notes rule, and any good sysadmin will block access to the corporate smtp servers. - if the user uses some form of webmail (gmail, hotmail, yahoo), and hasn't setup a local mail client. You may want to setup an smtp server for these users, which you would run yourself, but I would strongly advise against it. You would be creating an open smtp relay that would attract spammers, and will get you blacklisted on smtp relays worldwide. Furthermore, most corporate environments and some ISP's block SMTP traffic. Much better to report through some kind of webservice. If you're new to this, a good place to start reading is WCF (Windows Communication Foundation). Note that you will need a fixed IP address at your side of the deal, and that you will have to configure routers, firewalls, and web servers. If you can't easily get a fixed IP address, you may be able to get away with some with some free dynamic DNS provider. If this all sounds horrible complicated, get yourself a cheap asp.net provider, and host your error reporting code there.

    1 Reply Last reply
    0
    • T The Mighty Atom

      Meh, im really lost now. What to do? Keep trying and use the code others kindly provided in the thread, or drop bug reporting via email completely and try http/web service instead. I don't know anything about http servers and web services so yes, a sample would be nice. Also, i don't feel like adding my username and password into my code as it can be retrieved from the compiled exe. :confused:

      Virtual Space Shuttle Astronaut

      V Offline
      V Offline
      Vika Dev
      wrote on last edited by
      #27

      What version of VS are you writing your code in? It will help me get you going in the right direction. Also, do you have access to a windows hosting provider or would you try and host this yourself? Sorry if any of this is causing more confusion, but I think you'll be better off in the long run. Mike

      T 1 Reply Last reply
      0
      • V Vika Dev

        What version of VS are you writing your code in? It will help me get you going in the right direction. Also, do you have access to a windows hosting provider or would you try and host this yourself? Sorry if any of this is causing more confusion, but I think you'll be better off in the long run. Mike

        T Offline
        T Offline
        The Mighty Atom
        wrote on last edited by
        #28

        Im using Visual Studio 2010. My host is using Linux systems to host its sites, so ASP and ASP.Net is a no-go. Thanks for helping me, Mike. ;)

        Virtual Space Shuttle Astronaut

        1 Reply Last reply
        0
        • T The Mighty Atom

          Meh, im really lost now. What to do? Keep trying and use the code others kindly provided in the thread, or drop bug reporting via email completely and try http/web service instead. I don't know anything about http servers and web services so yes, a sample would be nice. Also, i don't feel like adding my username and password into my code as it can be retrieved from the compiled exe. :confused:

          Virtual Space Shuttle Astronaut

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #29

          it never needs your username/password; it needs to log into the sender's email service, not yours. :)

          Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum

          Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

          T 1 Reply Last reply
          0
          • L Luc Pattyn

            it never needs your username/password; it needs to log into the sender's email service, not yours. :)

            Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum

            Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

            T Offline
            T Offline
            The Mighty Atom
            wrote on last edited by
            #30

            No i mean the username/password to access my http server.

            Virtual Space Shuttle Astronaut

            S 1 Reply Last reply
            0
            • T The Mighty Atom

              No i mean the username/password to access my http server.

              Virtual Space Shuttle Astronaut

              S Offline
              S Offline
              shreekar
              wrote on last edited by
              #31

              It does not necessarily require user name/password. All you need to know on the server is: who and when the report was sent and what does the report say. You could implement some sort of hash to filter out spam traffic at http end. If ASP/.Net is no go and you have PHP skills, you can rustle up a simple form to accept the above information on your website. *Then* you could send an email or insert into database or whatever from the webserver. You could then submit this form from your desktop application code. It does seem daunting at first for a bug reporting mechanism - but this is a much reliable approach than trying to send the email. Hope this helps.

              Shreekar

              T 1 Reply Last reply
              0
              • S shreekar

                It does not necessarily require user name/password. All you need to know on the server is: who and when the report was sent and what does the report say. You could implement some sort of hash to filter out spam traffic at http end. If ASP/.Net is no go and you have PHP skills, you can rustle up a simple form to accept the above information on your website. *Then* you could send an email or insert into database or whatever from the webserver. You could then submit this form from your desktop application code. It does seem daunting at first for a bug reporting mechanism - but this is a much reliable approach than trying to send the email. Hope this helps.

                Shreekar

                T Offline
                T Offline
                The Mighty Atom
                wrote on last edited by
                #32

                No i do not have PHP skills, but i figure it would'nt be that hard to make an online form for the bug reporting? Im also waiting for Mike's example.

                Virtual Space Shuttle Astronaut

                V 1 Reply Last reply
                0
                • T The Mighty Atom

                  Won't DefaultCrendentials be enough then? If i understand correctly, DefaultCrendentials get the username and password of the sender's email client, right? Then there's not need for them to enter it?

                  Virtual Space Shuttle Astronaut

                  A Offline
                  A Offline
                  Asday
                  wrote on last edited by
                  #33

                  I don't know anything about the language any more, but I despise Outlook with a passion, and Thunderbird is a long forgotten memory, so I have no "default credentials" that I know of on file... Could that not be the promble?

                  1 Reply Last reply
                  0
                  • T The Mighty Atom

                    No i do not have PHP skills, but i figure it would'nt be that hard to make an online form for the bug reporting? Im also waiting for Mike's example.

                    Virtual Space Shuttle Astronaut

                    V Offline
                    V Offline
                    Vika Dev
                    wrote on last edited by
                    #34

                    Sorry I was slow at getting back to you. Got sidetracked with my project and then it was all downhill from there. I'm assuming you are still looking for some sort of solution to this. Are you interested in a method to create an execption report that can be emailed to you, or post to a web page? Mike

                    T 1 Reply Last reply
                    0
                    • V Vika Dev

                      Sorry I was slow at getting back to you. Got sidetracked with my project and then it was all downhill from there. I'm assuming you are still looking for some sort of solution to this. Are you interested in a method to create an execption report that can be emailed to you, or post to a web page? Mike

                      T Offline
                      T Offline
                      The Mighty Atom
                      wrote on last edited by
                      #35

                      That's ok. Im looking for an online bug reporter form as an built-in reporter form in my application doesn't work very well. Users click the bug Reporter menuitem in my application at which point the online bug reporter form opens in their browser, from there, they can specify all the info and in addition upload an exception report. I have yet to find out how to produce such a report. Thanks for your offer to help out. :)

                      Virtual Space Shuttle Astronaut

                      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