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. General Programming
  3. .NET (Core and Framework)
  4. How to send CC in VB.ET ?

How to send CC in VB.ET ?

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpcomsecuritytutorial
2 Posts 2 Posters 1 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
    nileshbahirshet
    wrote on last edited by
    #1

    I have written a code in VB.NET to send the mail... Try Dim ClientPC As New SmtpClient(ServerName, ServerPortNumber) Dim Authentication As New Net.NetworkCredential(ServerLoginName, Password) ClientPC.Credentials = Authentication Dim mSender As New MailAddress(ServerLoginName) Dim mReceiver As New MailAddress("myyahoomail@yahoo.com") Dim sMail As New MailMessage(mSender, mReceiver) sMail.Subject = SubjectOfMail sMail.Body = MailBody ClientPC.Send(sMail) Catch ex As SmtpException Throw ex Catch ex As Exception Throw ex End Try Mail goes perfectly .... Now I want to add CC too in above code where can I add CC code into this ?

    E 1 Reply Last reply
    0
    • N nileshbahirshet

      I have written a code in VB.NET to send the mail... Try Dim ClientPC As New SmtpClient(ServerName, ServerPortNumber) Dim Authentication As New Net.NetworkCredential(ServerLoginName, Password) ClientPC.Credentials = Authentication Dim mSender As New MailAddress(ServerLoginName) Dim mReceiver As New MailAddress("myyahoomail@yahoo.com") Dim sMail As New MailMessage(mSender, mReceiver) sMail.Subject = SubjectOfMail sMail.Body = MailBody ClientPC.Send(sMail) Catch ex As SmtpException Throw ex Catch ex As Exception Throw ex End Try Mail goes perfectly .... Now I want to add CC too in above code where can I add CC code into this ?

      E Offline
      E Offline
      Eslam Afifi
      wrote on last edited by
      #2

      sMail.CC.Add(ccReciever) 'ccReviever is the email of the CC reciever as string or as MailAddress

      Eslam Afifi

      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