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. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved C#
3 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.
  • C Offline
    C Offline
    clife537
    wrote on last edited by
    #1

    [Message Deleted]

    J A 2 Replies Last reply
    0
    • C clife537

      [Message Deleted]

      J Offline
      J Offline
      Justin Perez
      wrote on last edited by
      #2

      Are you sure that you wrote that code? It looks like you copied and pasted it from somewhere, without even looking at it. What's the give-away, you may ask?

      clife537 wrote:

      mail.From = "mail@mymail.com";

      clife537 wrote:

      mail.To = "mail@mymail.com";

      clife537 wrote:

      mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "mail@mymail.com";

      clife537 wrote:

      mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "xxxxxxx";

      clife537 wrote:

      SmtpMail.SmtpServer = "smtp.domain.com";

      You are supposed to replace all those with actual E-Mail addresses, and your working SMTP server.

      I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer

      1 Reply Last reply
      0
      • C clife537

        [Message Deleted]

        A Offline
        A Offline
        Ashish Derhgawen
        wrote on last edited by
        #3

        Isn't the MailMessage.To property, read-only? I don't think you can write

        clife537 wrote:

        mail.To = "mail@mymail.com";

        It would generate an error. To add an email address to the MailMessage.To property, you'd have to write something like: mail.To.Add("someone@somewhere.world"); Ashish

        Time flies like an arrow; Fruit flies like a banana. Ashish Derhgawen - http://ashishrd.blogspot.com[^]

        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