Dart Home | C++ Professional Toolkit | Custom Development | Reply | C++ Professional Toolkit Topics | Forums |
Author | Forum: C++ Professional Toolkit Topic: new headers are not acceptable in the mail tool |
aparna12 aparna@teleco.com From: decatur, GA USA Posts: 25 Member Since: 01/04/02 |
posted January 23, 2002 12:54 PM I am trying to add new header to the SMTP control and i don't see it when the mail is sent. For ed Disposition-Notification and X-Priority which are used fro return receipt and flag the importance of the mail. Let me know how to get around this problem |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted January 23, 2002 6:09 PM Hi, The below code works for me. -ken Smtp1.Message.Header.Add msgNull, "Disposition-Notification: whatever" Smtp1.Message.Header.Add msgNull, "X-Priority: 1" K M Drake Dart Tech Support |
aparna12 aparna@teleco.com From: decatur, GA USA Posts: 25 Member Since: 01/04/02 |
posted January 23, 2002 6:40 PM I am using c++ and find below the code pSmtp->GetMessage()->GetHeader()->Add(DartMail::msgNull,_bstr_t("Disposition-Notification-To: aparna@teleco.com"),true) and it doesn't work. |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted January 24, 2002 9:01 AM Hi, I pasted your line of code into the Smtp sample, ran it, and the sent message included the header. Please make sure you are using the latest version: http://www.dart.com/downloads/update.exe -ken K M Drake Dart Tech Support |
hmvgasman From: Welwyn Garden City, United Kingdom Posts: 8 Member Since: 09/18/02 |
posted January 2, 2003 10:48 AM The code for Disposition-Notification does now appear to work. However, I've tried to change the message content type and mime version without success (when I add an attachment it always comes up as "Multipart/Mixed", otherwise "Quoted-Printable"). //pSMTPsend->pSmtp->Message->Header->Add(DartMail::msgContentType, _bstr_t("Multipart/Custom-Message; Version=3.0"), true); //pSMTPsend->pSmtp->Message->Header->Add(DartMail::msgMIMEVersion, _bstr_t("1.0 (Custom 3.0)"), true); pSMTPsend->pSmtp->Message->Header->Add(DartMail::msgNull, _bstr_t("Content-type: Multipart/Custom-Message; Version=3.0"), true); pSMTPsend->pSmtp->Message->Header->Add(DartMail::msgNull, _bstr_t("Disposition-Notification-To: test@localhost"), true); |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 2, 2003 10:56 AM You can't just change the content type like that. When you add an attachment the content type gets chnaged by us. Any changes need to occur after the attachment is added. If you still have trouble and have an example of a message that you are trying to recreate, you can use Outlook Express to save the message content to a file and then send the message (zipped to preserve formatting ) to support@dart.com As soon as I can get to it I can try to write some code to guide. Be aware that the code will be in VB and you'll have translate it into C++ though. This is related to the inordinate amount of time that would have to be spent to write C++ as opposed to VB. If you want C++ code we'll have to take this up outside of the forum, which will require you to get a support package if you don't already have one. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 2, 2003 1:23 PM This is in response to the direct email you sent with the attached message. I'm sorry if I gave you hope, but you will not be able to create an exact duplicate of that message using the message object. Whenever you add an attachment, we turn the message into a multipart/mixed message. That's just the way our design is. You'd have to create the message elsewhere and send it as text instead of a message object. |
Reply | C++ Professional Toolkit Topics | Forums |
This site is powered by
![]() |