Dart Home | PowerTCP FTP for ActiveX | Custom Development | Reply | PowerTCP FTP for ActiveX Topics | Forums |
Author | Forum: PowerTCP FTP for ActiveX Topic: not able to find how to send inline attachments |
sharath sharathk@talisma.com From: Bangalore, India Posts: 8 Member Since: 03/19/10 |
posted March 19, 2010 9:24 AM I am able to send attachments but not able to find how to send inline attachments. can some one please help me with the info how to send inline attachments using DART, do i need to use parts and mime types? |
Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted March 19, 2010 5:24 PM You need to set the AttachmentDefaults property on the Message object for the file extension of the file you would like to be inline for example for jpg files you would add the following to the AttachmentsDefault property: Dim Msg As Message Msg.AttachmentDefaults.Add "JPG:Content-dispositon: inline" The mail control should then encode any JPG file as inline when the message is encoded before being sent. |
sharath sharathk@talisma.com From: Bangalore, India Posts: 8 Member Since: 03/19/10 |
posted March 22, 2010 5:27 AM Dear Jason.. as u told i set the AttachmentDefaults as below but it didnt work Smtp1.Message.AddAttachment Mid(txtAttach.Text, p1, p2 - p1) Smtp1.Message.AttachmentDefaults.Add "JPG:Content-dispositon: inline" please tell me do i need to encode the message before beeing sent? do i need to write any extra code? |
sharath sharathk@talisma.com From: Bangalore, India Posts: 8 Member Since: 03/19/10 |
posted March 22, 2010 5:30 AM Dear Jason.. as u told i set the AttachmentDefaults as below Smtp1.Message.AddAttachment "<<Attchment path, full name>>" Smtp1.Message.AttachmentDefaults.Add "JPG:Content-dispositon: inline" I attached JPG image only but still didnt get as inline but it comes as normal attachment please tell me do i need to encode the message before beeing sent? do i need to write any extra code? |
Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted March 22, 2010 9:19 AM I apologize, there was a typo in my original reply it should have been: "JPG:Content-disposition: inline" If the above still does not work then you should be able to edit the headers directly on the message object: Message.Headers.Add msgContentDisposition, "inline" |
sharath sharathk@talisma.com From: Bangalore, India Posts: 8 Member Since: 03/19/10 |
posted March 23, 2010 7:39 AM Thanks for the repply but none of those methods r working not sure where the problem is :( |
Jason Farrar (Admin) From: Oneida, NY USA Posts: 223 Member Since: 07/24/07 Extra Support Options Custom Application Development |
posted March 24, 2010 10:50 AM The following code works for me: '1. Declare a part variable Dim MsgPart As Part '2. Add Attachment and assign it to a part variable Set MsgPart = Smtp1.Message.AddAttachment("C:\test\farmville.jpg") '3. Set the content ID of the part to be used in the E-mail MsgPart.Header.Add msgContentID, "iids45637" '4. Set the content-type to image/jpeg for jpegs MsgPart.Header.Add msgContentType, "image/jpeg" '5. Set the content-disposition to inline MsgPart.Header.Add msgContentDisposition, "inline" You can find a list of valid MIME content-types if you need one other than jpeg here: http://en.wikipedia.org/wiki/Internet_media_type To use the inline attachment if it is a jpeg (or other image) you would add the following to your html text: <IMG SRC="cid:iids45637"> |
sharath sharathk@talisma.com From: Bangalore, India Posts: 8 Member Since: 03/19/10 |
posted March 30, 2010 9:35 AM Thanks for the reply Jason, u have really guven me lots of information but some how it is not working for me.. i might be doing some thing wrong... i will figure it out and post in here wat was wrong with my code |
sharath sharathk@talisma.com From: Bangalore, India Posts: 8 Member Since: 03/19/10 |
posted March 31, 2010 7:11 AM I didnt get.. " To use the inline attachment if it is a jpeg (or other image) you would add the following to your html text: <IMG SRC="cid:iids45637">" do i need to do the abow to send as inline attachment? |
Jamie Powell (Admin) From: Rome, NY USA Posts: 448 Member Since: 03/13/07 Extra Support Options Custom Application Development |
posted March 31, 2010 2:15 PM Thank you for your post. Please contact support@dart.com directly regarding this issue. Thank you. |
Reply | PowerTCP FTP for ActiveX Topics | Forums |
This site is powered by
![]() |