Windows Mail Programming - how to assign an account to an email message

Discussion in 'Windows Vista Mail' started by alfred, Aug 2, 2007.

  1. alfred

    alfred Guest

    Hello. I'm trying to learn the Windows Mail API and have run into a
    problem I can't figure out. I've been unable to find any good
    resources on the Windows Mail API and have only found 1 example which
    only covered the basics. The problem is when I create an email there
    is no account assigned to it. When Outlook Express tries to send this
    email message I get a warning telling me that no account has been
    assigned to the message and asks me if I'd like to use my default
    account to send it.

    Using the example I found, I was able to determine that the account
    name was assigned to a property named "att:athena-account-name" when
    an email message was created using OE. This property is not visible
    when viewing the message source in OE. I was unable to find any
    information on this or the other properties that appeared to be OE
    specific.

    How do I assign an account to an email programmatically using the
    Windows Mail API?
    Where can I find more information of these properties that OE uses to
    associate emails with accounts and how to set them?

    I am running Windows XP and Outlook Express 6.
    Any and all help is appreciated.

    Thanks in advance,

    Alfred
     
    alfred, Aug 2, 2007
    #1
    1. Advertisements

  2. alfred

    brink Guest

    Hi Alfred,

    For Windows Mail, you must set up the email account for it.
    1. Click Tools.
    2. Click Accounts.
    3. Click Add.
    4. Click E-mail Account.
    5. Click Next and enter the information from your email provider's
    setup instructions from their website.

    Windows Mail cannot get the account from OE6 or vice versa.

    Hope this helps,
    Shawn


    --
    brink

    *There are no dumb questions, just the people that do not ask them.*
    _http://www.vistax64.com/ (\"http://www.vistax64.com/\")_
    *Please post feedback to help others.*
     
    brink, Aug 2, 2007
    #2
    1. Advertisements

  3. alfred

    alfred Guest

    Thanks Shawn.

    I'm actually running Windows XP and Outlook Express 6. I wasn't sure
    which group to post my question to since it actually has to deal with
    the Windows Mail API and using it to program messaging applications.

    The API is located here -> http://msdn2.microsoft.com/en-gb/library/ms709546.aspx

    I found no groups referencing this API so I thought I'd try here.
    However, in the time between my first post and now I have answered my
    own question and I will explain it here for anyone else who is
    interested in using the Windows Mail API to create and send emails.

    The string "att:athena-account-name" is found in the file "mimeole.h"
    and appears to be an attribute (as I suspected) as the title of the
    section would indicate "Attributes Available through IMimePropertySet/
    IMimeBody". Now I should be able to take these attributes, now that
    I've found where they are defined, and use them to set the appropriate
    fields in the IMimePropertSet object. Doing so should associate an
    account with the email I've created. This should allow OE (and I
    assume Windows Mail with slight modifications to the code) to send the
    email without warning me that an account has not been associated with
    the email.

    Thanks again,

    Alfred
     
    alfred, Aug 2, 2007
    #3
  4. alfred

    brink Guest

    Alfred

    Glad to hear you got it. I would not of been able to help on that

    Shaw

    --
    brin

    *There are no dumb questions, just the people that do not ask them.*
    _http://www.vistax64.com/ (\"http://www.vistax64.com/\")_
    *Please post feedback to help others.*
     
    brink, Aug 2, 2007
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.