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. Add inline images To Mail C#

Add inline images To Mail C#

Scheduled Pinned Locked Moved C#
csharptutorial
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.
  • S Offline
    S Offline
    Sushant Duggal
    wrote on last edited by
    #1

    Hi, Can anyone tell me how to send images in the mail. Not as a attachment, I want to embed images in the mail. Thanks, Sushant Duggal.

    C 1 Reply Last reply
    0
    • S Sushant Duggal

      Hi, Can anyone tell me how to send images in the mail. Not as a attachment, I want to embed images in the mail. Thanks, Sushant Duggal.

      C Offline
      C Offline
      Corinna John
      wrote on last edited by
      #2

      If you use Outlook automation to send the mails, just insert the attachement at a position in (not after) the text:

      outlookItem.Attachments.Add(
      fileName,
      OlAttachmentType.olByValue,
      newItem.Body.Length+1, //This would ad it AFTER the text. Replace with the position you like
      fileNameWithoutPath);

      If you don't send the mails in an Outlook/Exchange environment, I suggest you forget it, because most email clients won't display the attachment inline unless you format a proper HTML email body with image tags referencing the attachments.

      S 1 Reply Last reply
      0
      • C Corinna John

        If you use Outlook automation to send the mails, just insert the attachement at a position in (not after) the text:

        outlookItem.Attachments.Add(
        fileName,
        OlAttachmentType.olByValue,
        newItem.Body.Length+1, //This would ad it AFTER the text. Replace with the position you like
        fileNameWithoutPath);

        If you don't send the mails in an Outlook/Exchange environment, I suggest you forget it, because most email clients won't display the attachment inline unless you format a proper HTML email body with image tags referencing the attachments.

        S Offline
        S Offline
        Sushant Duggal
        wrote on last edited by
        #3

        HI, Do you know how to get or from where to get an editor like the one provided in Microsoft Outlook? I'll be greatful for for help. Thanks, Sushant Duggal.

        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