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. How to send and receive e-mails in windows application?

How to send and receive e-mails in windows application?

Scheduled Pinned Locked Moved Visual Basic
csharptutorialquestion
5 Posts 3 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.
  • H Offline
    H Offline
    hgs24shravgi
    wrote on last edited by
    #1

    I am developing a windows application in VB.Net 2005. In this I want to send mail to my gmail id. And also if I receive mail on my gmail account then it should be displayed in my application. Firstly tell me how to send mail to any e-mail ID through my windows application. In short I want functionality of Outlook Express in my application means in Outlook Express we can configure our gmail or yahoo account in similar way I want to configure my gmail account into my windows application. :confused:Please tell me how to do this?

    S S 2 Replies Last reply
    0
    • H hgs24shravgi

      I am developing a windows application in VB.Net 2005. In this I want to send mail to my gmail id. And also if I receive mail on my gmail account then it should be displayed in my application. Firstly tell me how to send mail to any e-mail ID through my windows application. In short I want functionality of Outlook Express in my application means in Outlook Express we can configure our gmail or yahoo account in similar way I want to configure my gmail account into my windows application. :confused:Please tell me how to do this?

      S Offline
      S Offline
      Salman Sheikh
      wrote on last edited by
      #2

      study system.web.mail library deeply. it is simple to send mails

      Salman Sheikh

      1 Reply Last reply
      0
      • H hgs24shravgi

        I am developing a windows application in VB.Net 2005. In this I want to send mail to my gmail id. And also if I receive mail on my gmail account then it should be displayed in my application. Firstly tell me how to send mail to any e-mail ID through my windows application. In short I want functionality of Outlook Express in my application means in Outlook Express we can configure our gmail or yahoo account in similar way I want to configure my gmail account into my windows application. :confused:Please tell me how to do this?

        S Offline
        S Offline
        Steven J Jowett
        wrote on last edited by
        #3

        I think this link[^] has an answer for you.

        Steve Jowett ------------------------- Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'

        H 2 Replies Last reply
        0
        • S Steven J Jowett

          I think this link[^] has an answer for you.

          Steve Jowett ------------------------- Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'

          H Offline
          H Offline
          hgs24shravgi
          wrote on last edited by
          #4

          hey Steven, i tried the code given by you as follows - Dim myMessage As New System.Net.Mail.MailMessage() With myMessage .To.Add("harshal_shravgi@gmail.com") .From = New System.Net.Mail.MailAddress("harshal_shravgi@yahoo.com", "Harshal") .Subject = "Test For Sending Mail" '.Attachments.Add(New System.Net.Mail.Attachment("path of attachment here")) .Body = "Hi hello How are U?" .IsBodyHtml = False End With Dim SmtpMail As New System.Net.Mail.SmtpClient With SmtpMail .Host = "smtp.gmail.com" .DeliveryMethod = SmtpDeliveryMethod.Network 'Credentials only required if your SMTP server requires User Name and Password .Credentials = New System.Net.NetworkCredential("harshal@veda-logic.com", "board8414") .Send(myMessage) End With But got error as - The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first m34sm543278waf :confused:

          1 Reply Last reply
          0
          • S Steven J Jowett

            I think this link[^] has an answer for you.

            Steve Jowett ------------------------- Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'

            H Offline
            H Offline
            hgs24shravgi
            wrote on last edited by
            #5

            I did it using my gmail account as follows - Dim myMessage As New System.Net.Mail.MailMessage() With myMessage .To.Add("harshal_shravgi@rediffmail.com") .CC.Add("ashish@veda-logic.com") .From = New System.Net.Mail.MailAddress("harshal.shravgi@gmail.com", "Harshal") .Subject = "Test at " & Now .Attachments.Add(New System.Net.Mail.Attachment("C:\Documents and Settings\x\Desktop\code.txt")) .Body = "Hi hello How are U?" .IsBodyHtml = False End With Dim SmtpMail As New System.Net.Mail.SmtpClient With SmtpMail .Host = "smtp.gmail.com" .DeliveryMethod = SmtpDeliveryMethod.Network .Credentials = New System.Net.NetworkCredential("harshal.shravgi@gmail.com", "pochhi") .EnableSsl = True .Timeout = 10 .Port = 25 .Send(myMessage) End With MessageBox.Show("Message Sent") Now tell me how to receive mails same as we do it in Outlook Express

            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