Dart Home | PowerTCP Mail for ActiveX | Custom Development | Reply | PowerTCP Mail for ActiveX Topics | Forums |
Author | Forum: PowerTCP Mail for ActiveX Topic: Attachment makes body text disappear |
diarmaid From: Bethesda, MD USA Posts: 7 Member Since: 06/25/04 |
posted June 25, 2004 3:42 PM When I attach a (pdf) file to the object and provide some textual content for the body of the email, the message.text is not present when I receive the email. If I remove the attachment and resend, the message comes through. Using Outlook 2000 thru Exchange server. dartmail.dll is version 2.0.43.0. Below is all the code I use (minus login/out). mailer.Login "<our server>" mailer.DSN dsnFailureDelay mailer.Message.from = fromEmail mailer.Message.to.add toEmail If BCC <> "" then mailer.Message.Bcc.Add BCC If CC <> "" then mailer.Message.cc.add CC mailer.Message.subject = subject if attachment <> "" then mailer.Message.addAttachment attachment mailer.Message.Text = message mailer.send |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted June 25, 2004 4:27 PM That's a very old version. I would recommend installing the latest Mail tool and trying again. |
diarmaid From: Bethesda, MD USA Posts: 7 Member Since: 06/25/04 |
posted June 28, 2004 10:44 AM I upgraded to 2.8 and am still having the same problem. Here's the mail header: Received: from EXETER (our staging server) by our.mailserver.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id NSRM30WV; Mon, 28 Jun 2004 10:47:55 -0400 To: my@email.com From: my@email.com Subject: Investor Proposal for MIME-Version: 1.0 Content-Type: multipart/mixed; Boundary="--PTCP_000000010103a907d4" Message-ID: <000000020103aa07d4@[10.1.0.70]> Date: Mon, 28 Jun 2004 10:36:49 -0400 Attached is your Calvert Investor Proposal created for . Date: Monday, June 28, 2004 Prepared by: DIARMAID Firm: Calvert Phone: 301951xxxx ----PTCP_000000010103a907d4 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="advisorProposalPdfs/advisor450.pdf" Content-Type: application/pdf; name="advisorProposalPdfs/advisor450.pdf" ----PTCP_000000010103a907d4-- |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted June 28, 2004 11:05 AM I think the problem is that you are setting the Text property instead of using AddText (like our sample SMTP client app does) "Text" is the part of the message that a non-Mime email client sees first. "AddText" adds a new part that contains the text. If you just create a message and set the text property only, it works because it is a single part message and your email client knows that and just shows the text. Once you attach something, it becomes a multi-part message and the "Text" property would become like I initially described. |
diarmaid From: Bethesda, MD USA Posts: 7 Member Since: 06/25/04 |
posted June 28, 2004 2:48 PM I'm moving forward,but still having problems! I changed my code to use .AddText and now it attaches a second file to the email (ATT58371.txt) but there's nothing in it! Thanks for your excellent help to date. Here are the headers: -------------------- Received: from EXETER (staging.server.com [IP addr]) by our.mailserver.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id NSRMPBRH; Mon, 28 Jun 2004 14:48:26 -0400 To: me@myaddr.com From: Diarmaid <me@myaddr.com> Subject: Investor Proposal for Joe Bloggs MIME-Version: 1.0 Content-Type: multipart/mixed; Boundary="--PTCP_000000200103c807d4" Message-ID: <000000210103c907d4@[10.1.0.70]> Date: Mon, 28 Jun 2004 14:37:20 -0400 ----PTCP_000000200103c807d4 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="advisorProposalPdfs/advisor2910.pdf" Content-Type: application/pdf; name="advisorProposalPdfs/advisor2910.pdf" ----PTCP_000000200103c807d4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-Printable ----PTCP_000000200103c807d4-- HERE'S THE CODE: --------------- mailer.Login "our.mailserver.com" mailer.DSN dsnFailureDelay mailer.Message.from = fromEmail mailer.Message.to.add toEmail If BCC <> "" then mailer.Message.Bcc.Add BCC If CC <> "" then mailer.Message.cc.add CC mailer.Message.subject = subject if attachment <> "" then mailer.Message.addAttachment attachment if mailer.Message.Parts.Count > 0 then mailer.Message.AddText message Else mailer.Message.Text message End If mailer.send |
diarmaid From: Bethesda, MD USA Posts: 7 Member Since: 06/25/04 |
posted June 28, 2004 2:49 PM Oh yeah, forgot to mention that this is vbScript... |
diarmaid From: Bethesda, MD USA Posts: 7 Member Since: 06/25/04 |
posted June 28, 2004 3:03 PM ...and this error will probably help too! Err#10055: Connect method failed. An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. The socket cannot be connected |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted June 28, 2004 3:10 PM Have you tried the SMTP client sample yet? If not, please do so and tell me what I need to do to get the error you are seeing. |
diarmaid From: Bethesda, MD USA Posts: 7 Member Since: 06/25/04 |
posted June 28, 2004 4:10 PM The sample works fine. I don't know what needs to be done in order for you to recreate the error I'm getting. I guess I'll study the sample and see if I can trial & error my way to success... |
diarmaid From: Bethesda, MD USA Posts: 7 Member Since: 06/25/04 |
posted June 29, 2004 11:19 AM I might have discovered a bug. The .AddText method throws the error stated above (Err#10055: Connect method failed), but the problem goes away if you add a vbCrLf to the end of the message string! |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted June 29, 2004 11:32 AM Ok, I see that now. The sample adds a crlf so it always works. I have written this up, but at least you have a work around for now. |
Reply | PowerTCP Mail for ActiveX Topics | Forums |
This site is powered by
![]() |