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. Sending System.Drawing.Bitmap in mail body

Sending System.Drawing.Bitmap in mail body

Scheduled Pinned Locked Moved C#
graphicscomtutorialquestion
3 Posts 2 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
    Ashish Derhgawen
    wrote on last edited by
    #1

    Is it possible to put a System.Drawing.Bitmap object in the body of an email? I don't want to save the Bitmap as a file to send as an attachment. For example, if I create a new bitmap: Bitmap bmp = new Bitmap(320, 240); Is it possible to send this Bitmap in an email message without saving this Bitmap first? Thanks, Ashish

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

    G 1 Reply Last reply
    0
    • A Ashish Derhgawen

      Is it possible to put a System.Drawing.Bitmap object in the body of an email? I don't want to save the Bitmap as a file to send as an attachment. For example, if I create a new bitmap: Bitmap bmp = new Bitmap(320, 240); Is it possible to send this Bitmap in an email message without saving this Bitmap first? Thanks, Ashish

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

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

      You don't have to save it to a file to get the data. Create a MemoryStream to save it to, then you can get the data from the MemoryStream as a byte array.

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

      A 1 Reply Last reply
      0
      • G Guffa

        You don't have to save it to a file to get the data. Create a MemoryStream to save it to, then you can get the data from the MemoryStream as a byte array.

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

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

        Thanks Guffa! I never thought of that.:)

        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