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. email using MIME. Please help.

email using MIME. Please help.

Scheduled Pinned Locked Moved C#
hardwarehelptutorialquestionannouncement
6 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.
  • A Offline
    A Offline
    alimohammed
    wrote on last edited by
    #1

    Hi i want to write code to send email with embedded image. i have used system.web.mail reference, and i have converted the image to base64 encoded data. Now anyone please tell me how to embed this to the email? Anyone know the code? Do i need to specify headers like "MIME Version" etc...? please advice. Thanks in advance. Ali

    G 1 Reply Last reply
    0
    • A alimohammed

      Hi i want to write code to send email with embedded image. i have used system.web.mail reference, and i have converted the image to base64 encoded data. Now anyone please tell me how to embed this to the email? Anyone know the code? Do i need to specify headers like "MIME Version" etc...? please advice. Thanks in advance. Ali

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Don't you have the image as a file? Then you can simply create a MailAttachment object from the file and add to the mail.

      --- b { font-weight: normal; }

      A 1 Reply Last reply
      0
      • G Guffa

        Don't you have the image as a file? Then you can simply create a MailAttachment object from the file and add to the mail.

        --- b { font-weight: normal; }

        A Offline
        A Offline
        alimohammed
        wrote on last edited by
        #3

        No, It's a news letter. I have to show the image in email body. I cannot use image source as URL. It's for news letter sending.

        G 1 Reply Last reply
        0
        • A alimohammed

          No, It's a news letter. I have to show the image in email body. I cannot use image source as URL. It's for news letter sending.

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          An attachment doesn't use an URL.

          --- b { font-weight: normal; }

          A 1 Reply Last reply
          0
          • G Guffa

            An attachment doesn't use an URL.

            --- b { font-weight: normal; }

            A Offline
            A Offline
            alimohammed
            wrote on last edited by
            #5

            Hi Guffa, Can i use an attachment to be shown in the mail body like what we see in newsletters? if so, please tell me how... thank you ali

            G 1 Reply Last reply
            0
            • A alimohammed

              Hi Guffa, Can i use an attachment to be shown in the mail body like what we see in newsletters? if so, please tell me how... thank you ali

              G Offline
              G Offline
              Gavin Roberts
              wrote on last edited by
              #6

              Using the mime repositry. http://www.ietf.org/rfc/rfc1521.txt[^] I haven't used it, but I know your going to need a custom smtp option, as smtp class doesn't generate multi/part content. Gav

              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