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. Sending Mail

Sending Mail

Scheduled Pinned Locked Moved ASP.NET
com
10 Posts 5 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.
  • N Offline
    N Offline
    NET India
    wrote on last edited by
    #1

    Hello Everyone, I'm try to send email on the net. The coding i've used is given below. This piece of code is just generating the message "Message Sent Successfully" but not sending the message physically This code of piece is clicked over a Button MailMessage mail=new MailMessage(); mail.To="manoj.manojbisht@gmail.com"; mail.From="msb1984_620@yahoo.com"; mail.Subject="Manoj Bisht"; mail.Priority=MailPriority.High; mail.Body="I Love U Do You Love Me"; try { SmtpMail.SmtpServer=""; SmtpMail.Send(mail); //Response.Write("Mail Sent Successfully"); lblMsg.Text="Mail Sent Succesffully"; lblMsg.ForeColor=Color.DarkBlue; } catch(Exception ex) { Response.Write("Message Failed"); }

    S S K 3 Replies Last reply
    0
    • N NET India

      Hello Everyone, I'm try to send email on the net. The coding i've used is given below. This piece of code is just generating the message "Message Sent Successfully" but not sending the message physically This code of piece is clicked over a Button MailMessage mail=new MailMessage(); mail.To="manoj.manojbisht@gmail.com"; mail.From="msb1984_620@yahoo.com"; mail.Subject="Manoj Bisht"; mail.Priority=MailPriority.High; mail.Body="I Love U Do You Love Me"; try { SmtpMail.SmtpServer=""; SmtpMail.Send(mail); //Response.Write("Mail Sent Successfully"); lblMsg.Text="Mail Sent Succesffully"; lblMsg.ForeColor=Color.DarkBlue; } catch(Exception ex) { Response.Write("Message Failed"); }

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      Did you check the Norton is Blocking or not.

      Regards, Satips.:rose:

      1 Reply Last reply
      0
      • N NET India

        Hello Everyone, I'm try to send email on the net. The coding i've used is given below. This piece of code is just generating the message "Message Sent Successfully" but not sending the message physically This code of piece is clicked over a Button MailMessage mail=new MailMessage(); mail.To="manoj.manojbisht@gmail.com"; mail.From="msb1984_620@yahoo.com"; mail.Subject="Manoj Bisht"; mail.Priority=MailPriority.High; mail.Body="I Love U Do You Love Me"; try { SmtpMail.SmtpServer=""; SmtpMail.Send(mail); //Response.Write("Mail Sent Successfully"); lblMsg.Text="Mail Sent Succesffully"; lblMsg.ForeColor=Color.DarkBlue; } catch(Exception ex) { Response.Write("Message Failed"); }

        S Offline
        S Offline
        Sandeep Akhare
        wrote on last edited by
        #3

        Are you using VS 2005 if yes then you have new namespace called System.Net.Mail USe that i think you don;t have SMPT server at your machin in running state

        Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

        S 1 Reply Last reply
        0
        • N NET India

          Hello Everyone, I'm try to send email on the net. The coding i've used is given below. This piece of code is just generating the message "Message Sent Successfully" but not sending the message physically This code of piece is clicked over a Button MailMessage mail=new MailMessage(); mail.To="manoj.manojbisht@gmail.com"; mail.From="msb1984_620@yahoo.com"; mail.Subject="Manoj Bisht"; mail.Priority=MailPriority.High; mail.Body="I Love U Do You Love Me"; try { SmtpMail.SmtpServer=""; SmtpMail.Send(mail); //Response.Write("Mail Sent Successfully"); lblMsg.Text="Mail Sent Succesffully"; lblMsg.ForeColor=Color.DarkBlue; } catch(Exception ex) { Response.Write("Message Failed"); }

          K Offline
          K Offline
          Krish KP
          wrote on last edited by
          #4

          Check whether 1. port is blocked 2. smtp is configured properly

          Regards KP

          N 1 Reply Last reply
          0
          • K Krish KP

            Check whether 1. port is blocked 2. smtp is configured properly

            Regards KP

            N Offline
            N Offline
            NET India
            wrote on last edited by
            #5

            Can u tell me sir how to configure the smtp plz

            P K 2 Replies Last reply
            0
            • S Sandeep Akhare

              Are you using VS 2005 if yes then you have new namespace called System.Net.Mail USe that i think you don;t have SMPT server at your machin in running state

              Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

              S Offline
              S Offline
              Sathesh Sakthivel
              wrote on last edited by
              #6

              Sandeep Akhare wrote:

              Systtem.Net.Mail

              It is System.Net.Mail. Correct your Spelling Sandeep.

              Regards, Satips.:rose:

              S 1 Reply Last reply
              0
              • S Sathesh Sakthivel

                Sandeep Akhare wrote:

                Systtem.Net.Mail

                It is System.Net.Mail. Correct your Spelling Sandeep.

                Regards, Satips.:rose:

                S Offline
                S Offline
                Sandeep Akhare
                wrote on last edited by
                #7

                Thats not a issue anybody can get what the namespace is Any way i corrected it Issue solved sir :->

                Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

                S 1 Reply Last reply
                0
                • S Sandeep Akhare

                  Thats not a issue anybody can get what the namespace is Any way i corrected it Issue solved sir :->

                  Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

                  S Offline
                  S Offline
                  Sathesh Sakthivel
                  wrote on last edited by
                  #8

                  I know it Just to make it correct i said it. Check your mail and reply to me.

                  Regards, Satips.:rose:

                  1 Reply Last reply
                  0
                  • N NET India

                    Can u tell me sir how to configure the smtp plz

                    P Offline
                    P Offline
                    PrakashBhaskar
                    wrote on last edited by
                    #9

                    The below code should work else you your mail will be put in queue/badmail folder under the inetpub/mail eMail = new MailMessage(); eMail.BodyFormat = MailFormat.Text; eMail.From = _SendFrom; eMail.Fields[http://schemas.microsoft.com/cdo/configuration/smtsperver\] = "SMTPServerName"; eMail.Fields[ "http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = 25; eMail.Fields[ "http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2; if (SMTPUser != null && SMTPPassword != null) { eMail.Fields[ "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1; eMail.Fields[ "http://schemas.microsoft.com/cdo/configuration/sendusername"] = "mailid@yourdomain.com"; eMail.Fields[ "http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "your account password"; } eMail.To = "recipients"; SmtpMail.SmtpServer = SMTPServerName; SmtpMail.Send(eMail); //

                    Thanks Warm Regards Prakash-B

                    1 Reply Last reply
                    0
                    • N NET India

                      Can u tell me sir how to configure the smtp plz

                      K Offline
                      K Offline
                      Krish KP
                      wrote on last edited by
                      #10

                      request you take help of System Administrator

                      Regards KP

                      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