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. Web Development
  3. ASP.NET
  4. Send Mail without IIS

Send Mail without IIS

Scheduled Pinned Locked Moved ASP.NET
windows-admintutorial
12 Posts 6 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.
  • M Offline
    M Offline
    madancode
    wrote on last edited by
    #1

    Hi ... How to send an email with out installation of IIS.

    L L A C M 5 Replies Last reply
    0
    • M madancode

      Hi ... How to send an email with out installation of IIS.

      L Offline
      L Offline
      lackonagy
      wrote on last edited by
      #2

      Hi, You don't need IIS for sending emails. What you need is to connect to an SMTP (simple mail transfer protocol) server. Here's a sample: ... using System.Net.Mail; ... public bool SendEmail(ref string errMsg) { errMsg = ""; bool res = false; MailMessage msg = new MailMessage("fromemail@someserver.com", "toemail@someserver.com", "This is the subject", "This is the email body..."); msg.IsBodyHtml = false; SmtpClient client = new SmtpClient("smtp.someserver.com", 25); // the address and port of the SMTP server client.Credentials = new System.Net.NetworkCredential("username", "password"); // user name and password to the SMTP server try { client.Send(msg); res = true; } catch (Exception e) { errMsg = e.Message; res = false; } return res; }

      A 1 Reply Last reply
      0
      • L lackonagy

        Hi, You don't need IIS for sending emails. What you need is to connect to an SMTP (simple mail transfer protocol) server. Here's a sample: ... using System.Net.Mail; ... public bool SendEmail(ref string errMsg) { errMsg = ""; bool res = false; MailMessage msg = new MailMessage("fromemail@someserver.com", "toemail@someserver.com", "This is the subject", "This is the email body..."); msg.IsBodyHtml = false; SmtpClient client = new SmtpClient("smtp.someserver.com", 25); // the address and port of the SMTP server client.Credentials = new System.Net.NetworkCredential("username", "password"); // user name and password to the SMTP server try { client.Send(msg); res = true; } catch (Exception e) { errMsg = e.Message; res = false; } return res; }

        A Offline
        A Offline
        Abhijit Jana
        wrote on last edited by
        #3

        lackonagy wrote:

        You don't need IIS for sending emails. What you need is to connect to an SMTP (simple mail transfer protocol) server.

        How would I Install SMTP with out IIS ?

        cheers, Abhijit CodeProject.Com MVP

        1 Reply Last reply
        0
        • M madancode

          Hi ... How to send an email with out installation of IIS.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          If you don't want to use IIS for sending main, then the replacement is Database. You can send mail over Internet using SQL Server. DB: Master Procedure: xp_sendmail

          A 1 Reply Last reply
          0
          • L Lost User

            If you don't want to use IIS for sending main, then the replacement is Database. You can send mail over Internet using SQL Server. DB: Master Procedure: xp_sendmail

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            Amandeep Singh Bhullar wrote:

            You can send mail over Internet using SQL Server. DB: Master Procedure: xp_sendmail

            Amandeep, that great can you have more resource means any links on that ? please share with me. Thanks in advance !!

            cheers, Abhijit CodeProject.Com MVP

            L 1 Reply Last reply
            0
            • A Abhijit Jana

              Amandeep Singh Bhullar wrote:

              You can send mail over Internet using SQL Server. DB: Master Procedure: xp_sendmail

              Amandeep, that great can you have more resource means any links on that ? please share with me. Thanks in advance !!

              cheers, Abhijit CodeProject.Com MVP

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              In our organization we have xp_sendmail stored procedure in MS SQL Server. Details of this are in MSDN http://msdn.microsoft.com/en-us/library/ms189505.aspx

              A 1 Reply Last reply
              0
              • L Lost User

                In our organization we have xp_sendmail stored procedure in MS SQL Server. Details of this are in MSDN http://msdn.microsoft.com/en-us/library/ms189505.aspx

                A Offline
                A Offline
                Abhijit Jana
                wrote on last edited by
                #7

                Thanks :)

                cheers, Abhijit CodeProject.Com MVP

                1 Reply Last reply
                0
                • M madancode

                  Hi ... How to send an email with out installation of IIS.

                  A Offline
                  A Offline
                  Anshumas
                  wrote on last edited by
                  #8

                  Not possible.. when install IIS on your server there is option of SMTP server that is fully responsible for mail transfer. even if you are able to third party tool for the SMTP server then is is possible..

                  Anshuman Singh

                  A 1 Reply Last reply
                  0
                  • M madancode

                    Hi ... How to send an email with out installation of IIS.

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #9

                    If you don't have IIS installed, then you can't run ASP.NET, so why are you asking here ? Sending mail does not require IIS, it requires a mail server to send through, which IIS by default, is not. I don't know what these other people are telling you.

                    Christian Graus Driven to the arms of OSX by Vista.

                    1 Reply Last reply
                    0
                    • A Anshumas

                      Not possible.. when install IIS on your server there is option of SMTP server that is fully responsible for mail transfer. even if you are able to third party tool for the SMTP server then is is possible..

                      Anshuman Singh

                      A Offline
                      A Offline
                      Abhijit Jana
                      wrote on last edited by
                      #10

                      Anshumas wrote:

                      Not possible..

                      :) that's why I asked that personthat how he will install SMTP with out IIS ? :laugh:

                      cheers, Abhijit CodeProject MVP My Blog :Abhijit's World of .Net

                      A 1 Reply Last reply
                      0
                      • M madancode

                        Hi ... How to send an email with out installation of IIS.

                        M Offline
                        M Offline
                        madancode
                        wrote on last edited by
                        #11

                        Hi...Guys Thanks For your timly reply i got the solution....

                        1 Reply Last reply
                        0
                        • A Abhijit Jana

                          Anshumas wrote:

                          Not possible..

                          :) that's why I asked that personthat how he will install SMTP with out IIS ? :laugh:

                          cheers, Abhijit CodeProject MVP My Blog :Abhijit's World of .Net

                          A Offline
                          A Offline
                          Anshumas
                          wrote on last edited by
                          #12

                          you do not need laugh... the question is how to send mail without iis, may you can host your site on linux server there is no need of web server http://atmail.com/linux-email-server/?gclid=CL6AlZ_kipgCFZEwpAodbj654Q[^] every developer is very known about smtp is one server of IIS. it can not run without IIS. so be mature.:mad:

                          Anshuman Singh

                          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