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. C#
  4. How to send mail using SMTP

How to send mail using SMTP

Scheduled Pinned Locked Moved C#
comdata-structureshelptutorialquestion
6 Posts 4 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.
  • G Offline
    G Offline
    gr8tushar
    wrote on last edited by
    #1

    Hii All, I wanna know how can i send mail thru my pc without using any email client. i tried using SMTPMail object. in that i specified the SmtpServer as "localhost". On doing so all my mails are delivered into "c:\Inetpub\mailroot\Queue\" directory. Now i want to know how d i send these mails to xyz@yahoo.com or at hotmail address. Please someone help me. Tushar

    E M H 3 Replies Last reply
    0
    • G gr8tushar

      Hii All, I wanna know how can i send mail thru my pc without using any email client. i tried using SMTPMail object. in that i specified the SmtpServer as "localhost". On doing so all my mails are delivered into "c:\Inetpub\mailroot\Queue\" directory. Now i want to know how d i send these mails to xyz@yahoo.com or at hotmail address. Please someone help me. Tushar

      E Offline
      E Offline
      eggie5
      wrote on last edited by
      #2

      Um, do you know C#? If so, I can give you some refrences... Framework SMTP Class: System.Web.Mail Namespace[^] CodeProject Examples: SNTP Client in C#[^] Sending Mail Using C# via SMTP[^] But really; Before looking at all that, you should read this... The SMTP Specification[^] I havn't read this particular one, but I did read the POP3 specification. It gave me a much clearer understanding of what's going on. So, do that. And always remember and never forget... SEARCH GOOGLE. There are tons of examples on the net too, with lots of 3rd party components also. I hope this helps... I'm not sure if I under stood you correctly... "...without using any email client." With out a client at all, with out Outlook, a console window, service? i'm confused... /\ |_ E X E GG

      1 Reply Last reply
      0
      • G gr8tushar

        Hii All, I wanna know how can i send mail thru my pc without using any email client. i tried using SMTPMail object. in that i specified the SmtpServer as "localhost". On doing so all my mails are delivered into "c:\Inetpub\mailroot\Queue\" directory. Now i want to know how d i send these mails to xyz@yahoo.com or at hotmail address. Please someone help me. Tushar

        M Offline
        M Offline
        Mazdak
        wrote on last edited by
        #3

        piscian1982 wrote: i tried using SMTPMail object. in that i specified the SmtpServer as "localhost". SmtpServer is where you post it TO,so it is obvios where does it go. Maybe these links helps you. http://www.codeproject.com/csharp/emailsender.asp[^] http://www.codeproject.com/dotnet/SMTP_with_Authentication.asp[^] If you don't want any setting in your computer you can send mail with Socket class and do dot use SmtpMail class. Like this article: http://www.codeproject.com/csharp/sendmailcsharp.asp[^] Mazy No sig. available now.

        1 Reply Last reply
        0
        • G gr8tushar

          Hii All, I wanna know how can i send mail thru my pc without using any email client. i tried using SMTPMail object. in that i specified the SmtpServer as "localhost". On doing so all my mails are delivered into "c:\Inetpub\mailroot\Queue\" directory. Now i want to know how d i send these mails to xyz@yahoo.com or at hotmail address. Please someone help me. Tushar

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          You have to setup your SMTP Virtual Server in the Internet Information Manager snap-in (in your Administrative Tools in your Control Panel) to forward mail accordingly. Otherwise, the server doesn't know where to send mail.

          -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

          G 1 Reply Last reply
          0
          • H Heath Stewart

            You have to setup your SMTP Virtual Server in the Internet Information Manager snap-in (in your Administrative Tools in your Control Panel) to forward mail accordingly. Otherwise, the server doesn't know where to send mail.

            -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

            G Offline
            G Offline
            gr8tushar
            wrote on last edited by
            #5

            Hii Thanx for this. But actually i didn't unerstand anything in this GEEK code. COuld u please tell me in detail how to configure SMTP virtual server so that i can send mails to Internet mail accounts like Yahoo and Hotmail.

            H 1 Reply Last reply
            0
            • G gr8tushar

              Hii Thanx for this. But actually i didn't unerstand anything in this GEEK code. COuld u please tell me in detail how to configure SMTP virtual server so that i can send mails to Internet mail accounts like Yahoo and Hotmail.

              H Offline
              H Offline
              Heath Stewart
              wrote on last edited by
              #6

              Um, yeah, that's called a signature - it wasn't part of the message. As I said, open Internet Information Manager and you should see your SMTP Virtual Server. Right-click and select Properties, then RTFD. There's far too much to cover in a forum. You have to understand basic SMTP implementation, but the docs will help. As always, just hit F1.

              -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

              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