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. how to send mail using smpt server

how to send mail using smpt server

Scheduled Pinned Locked Moved ASP.NET
sysadmintutorial
6 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.
  • S Offline
    S Offline
    sugunavathysubramanian
    wrote on last edited by
    #1

    hai, i am using somany code to send mail.but it dosenot work.if know the code replay to me..

    S C P 3 Replies Last reply
    0
    • S sugunavathysubramanian

      hai, i am using somany code to send mail.but it dosenot work.if know the code replay to me..

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

      sugunavathysubramanian wrote:

      i am using somany code to send mail

      OK

      sugunavathysubramanian wrote:

      but it dosenot work

      Whats the problem you are facing ?

      sugunavathysubramanian wrote:

      f know the code replay to me.

      Ya i have your code in my machine Just saw in Google home Page Just kidding ;P How can we know without looking into the code :)

      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... "

      1 Reply Last reply
      0
      • S sugunavathysubramanian

        hai, i am using somany code to send mail.but it dosenot work.if know the code replay to me..

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

        This is explicitly covered in the article I link to in my sig.

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        E 1 Reply Last reply
        0
        • C Christian Graus

          This is explicitly covered in the article I link to in my sig.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          E Offline
          E Offline
          eyeseetee
          wrote on last edited by
          #4

          Your signature link, if used everytime you recommend it, properly has more hits then bbc.co.uk!

          1 Reply Last reply
          0
          • S sugunavathysubramanian

            hai, i am using somany code to send mail.but it dosenot work.if know the code replay to me..

            P Offline
            P Offline
            Piyush Vardhan Singh
            wrote on last edited by
            #5

            Imports System.Net.Mail Try Dim userEmailAddress As String = _Setting.SMTPUsername 'Create the MailMessage instance Dim _MailMessage As New MailMessage(userEmailAddress, ToUserId) 'Assign the MailMessage's properties _MailMessage.Subject = Subject _MailMessage.Body = Body _MailMessage.IsBodyHtml = False 'Create the SmtpClient object Dim smtp As New SmtpClient smtp.Host = _Setting.SMTPServer smtp.Port = _Setting.SMTPPort Dim networkCredential As New Net.NetworkCredential(SMTPUsername, SMTPPassword) smtp.Credentials = networkCredential 'Send the MailMessage (will use the config settings) smtp.Send(_MailMessage) Catch ex As Exception Trace.WriteLine(" Class:- SMTPGateway, Function:- SendEmail() : Error: " + ex.ToString, Tracing.MSG_EXCEPTION) End Try

            Piyush Vardhan Singh p_vardhan14@rediffmail.com http://holyschoolofvaranasi.blogspot.com http://holytravelsofvaranasi.blogspot.com

            R 1 Reply Last reply
            0
            • P Piyush Vardhan Singh

              Imports System.Net.Mail Try Dim userEmailAddress As String = _Setting.SMTPUsername 'Create the MailMessage instance Dim _MailMessage As New MailMessage(userEmailAddress, ToUserId) 'Assign the MailMessage's properties _MailMessage.Subject = Subject _MailMessage.Body = Body _MailMessage.IsBodyHtml = False 'Create the SmtpClient object Dim smtp As New SmtpClient smtp.Host = _Setting.SMTPServer smtp.Port = _Setting.SMTPPort Dim networkCredential As New Net.NetworkCredential(SMTPUsername, SMTPPassword) smtp.Credentials = networkCredential 'Send the MailMessage (will use the config settings) smtp.Send(_MailMessage) Catch ex As Exception Trace.WriteLine(" Class:- SMTPGateway, Function:- SendEmail() : Error: " + ex.ToString, Tracing.MSG_EXCEPTION) End Try

              Piyush Vardhan Singh p_vardhan14@rediffmail.com http://holyschoolofvaranasi.blogspot.com http://holytravelsofvaranasi.blogspot.com

              R Offline
              R Offline
              Reelix
              wrote on last edited by
              #6

              A (REALLY)small demo in C# http://reelix.googlepages.com/mail.txt[^] Hope it helps! - Reelix

              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