Click here to Skip to main content
12,553,488 members (62,686 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++

can i ask for sample code or explanation on how to add a x-header in an outlook mail item using C++?

I badly need your answers this week..
please help

Posted 24-Jan-13 17:10pm
lee gee375
Updated 26-Jan-13 20:55pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Your problem description is not quite complete. You have flagged C++ and mention Exchange and MAPI. Are you talking about using an SMTP sender written in C++ ... or you want to know how to write an SMTP client for Exchange?

There are many SMTP clients out there (I wrote one but not for Exchange) and the documentation for each of these should include info on how to add an x-header.
lee gee 27-Jan-13 2:55am
Hi H.Brydon, thanks for your answer.
My goal is to write a code in C++ that can add an x-header in an Outlook mailitem. Can I ask insights from you about this?

H.Brydon 27-Jan-13 16:46pm
The link has an example in VB for Outlook 2002 (I know you said C++).

One thing you can do is set up Outlook to send outgoing email through an external SMTP server (on your main mail account or a separate one) and you might have more options with the SMTP interface.

Also, the link at might show some insight into how to send headers of your choice in outgoing messages. You might be able to wangle this into something you can embed in "Stationary".

[I am not a fan of either Outlook or Exchange Server.]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.161021.1 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100