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. C#
  4. Simple MAPI can't fill address field

Simple MAPI can't fill address field

Scheduled Pinned Locked Moved C#
helptutorialsysadmin
1 Posts 1 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.
  • R Offline
    R Offline
    Ray170
    wrote on last edited by
    #1

    I am trying to send email using the simple mapi. I cannot download the example because the server seems to be unavailable, so I wonder if anyone can help. The problem I have is how to handle the MapiRecipDesc field in the MapiMessage structure. Apart from this it all works except I can't fill the Address field. I have the following declarations [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] public class MapiMessage { public uint ulReserved=0; public string lpszSubject=""; public string lpszNoteText=""; public string lpszMessageType=""; public string lpszDateReceived=""; public string lpszConversationID=""; public uint flFlags=0; public MapiRecipDesc lpOriginator; public long nRecipCount; public MapiRecipDesc lpRecips; public ulong nFileCount=0; public MapiFileDesc lpFiles; } [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] public class MapiRecipDesc { public ulong ulReserved=0; public ulong ulRecipClass=0; public string lpszName=""; public String lpszAddress=""; public ulong ulEIDSize=0; public IntPtr lpEntryID = IntPtr.Zero; } and in the body I do public const uint MAPI_TO=1; MapiMessage message= new MapiMessage(); MapiRecipDesc recipDesc =new MapiRecipDesc(); recipDesc.ulRecipClass = MAPI_TO; recipDesc.lpszName = "Fred"; recipDesc.lpszAddress = "someone@somewhere" message.lpszSubject = "test subject"; message.lpszNoteText = "test message"; message.nRecipCount = 1; message.lpRecips = recipDesc; Ray

    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