Author | Topic: Content-ID | |
---|---|---|
SZOLEX | Content-ID on Tue, 21 Nov 2006 14:48:21 +0100 Hi all! I want to request the embedded picture "Content-ID", because I want to display one HTML-email with embedded picture. The MIMEContent() have not one function for it? What can I do to solve this problem? | |
mark carew | Re: Content-ID on Wed, 22 Nov 2006 05:32:14 +1000 Hi Anonymouse, Use marshallsoft see4xb. Regards Mark | |
Thomas Braun | Re: Content-ID on Wed, 22 Nov 2006 18:00:06 +0100 mark carew wrote: > Hi Anonymouse, > > Use marshallsoft see4xb. Yes - this is the real solution - everything you need for email in one cheap package, cheap = worth every cent" (or Forint, since Mr. Anonymouse posts with an hungarian email address Thomas | |
Phil Ide | Re: Content-ID on Wed, 22 Nov 2006 11:28:03 +0000 SZOLEX, > I want to request the embedded picture "Content-ID", because I want to > display one HTML-email with embedded picture. > The MIMEContent() have not one function for it? > > What can I do to solve this problem? Look at te raw message, and you'll see that the message has several mime components. One of them has an ID which matches what you are looking for. Regards, Phil Ide --------------------- www.xbhcl.com www.pbih.eu www.idep.org.uk/xbase --------------------- Few women admit their age. Few men act theirs. | |
Vladimir Iahnenco | Re: Content-ID on Wed, 22 Nov 2006 10:15:31 -0500 SZOLEX, An example goes with AsiNet install. See C:\Alaska\ASInet\SOURCE\SAMPLES\ASINET\HTMLMAIL\ Regards, Vladimir "Phil Ide" <phil@idep.org.uk> wrote in message news:qghuj1g04mxx.e4kpoe070tyq$.dlg@40tude.net... > SZOLEX, > >> I want to request the embedded picture "Content-ID", because I want to >> display one HTML-email with embedded picture. >> The MIMEContent() have not one function for it? >> >> What can I do to solve this problem? > > Look at te raw message, and you'll see that the message has several mime > components. One of them has an ID which matches what you are looking for. > > Regards, > -- > Phil Ide > > --------------------- > www.xbhcl.com > www.pbih.eu > www.idep.org.uk/xbase > --------------------- > Few women admit their age. Few men act theirs. | |
SZOLEX | Re: Content-ID on Fri, 24 Nov 2006 10:57:05 +0100 Hi! I received the attached email. //HTML . . . <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'> <img width=3D560 height=3D267 = id=3D"_x0000_i1025" src=3D"cid:01C70FB4.B0EAB450"> //Here is the picture reference <o:p></o:p></span></font></p> . . . //Image ------=_NextPart_000_0000_01C70FB4.B1A06FC0 Content-Type: image/jpeg; name="image001.jpg" Content-Transfer-Encoding: base64 Content-ID: <01C70FB4.B0EAB450> What is the Content-ID in this case? :getContentType() retuns: image/jpeg; name="image001.jpg" :getFileName() returns: image001.jpg :getcontentTransferEncoding returns: "" (not works) What function returns the Content-ID? SubStr()? If I don't know the Content-ID, the HTML will not be shown properly. Regards, Szolex :-) "Vladimir Iahnenco" <iahnenco@yahoo.com> az albbiakat rta a kvetkezo zenetben news:775f753d$a4b86e6$68058@news.alaska-software.com... > SZOLEX, > An example goes with AsiNet install. > See C:\Alaska\ASInet\SOURCE\SAMPLES\ASINET\HTMLMAIL\ > > Regards, > Vladimir > > "Phil Ide" <phil@idep.org.uk> wrote in message > news:qghuj1g04mxx.e4kpoe070tyq$.dlg@40tude.net... > > SZOLEX, > > > >> I want to request the embedded picture "Content-ID", because I want to > >> display one HTML-email with embedded picture. > >> The MIMEContent() have not one function for it? > >> > >> What can I do to solve this problem? > > > > Look at te raw message, and you'll see that the message has several mime > > components. One of them has an ID which matches what you are looking for. > > > > Regards, > > -- > > Phil Ide > > > > --------------------- > > www.xbhcl.com > > www.pbih.eu > > www.idep.org.uk/xbase > > --------------------- > > Few women admit their age. Few men act theirs. > > email.zip | |
Phil Ide | Re: Content-ID on Fri, 24 Nov 2006 12:49:37 +0000 Szolex, > //Image > ------=_NextPart_000_0000_01C70FB4.B1A06FC0 > Content-Type: image/jpeg; > name="image001.jpg" > Content-Transfer-Encoding: base64 > Content-ID: <01C70FB4.B0EAB450> > > > What is the Content-ID in this case? > >:getContentType() retuns: image/jpeg; > name="image001.jpg" >:getFileName() returns: image001.jpg >:getcontentTransferEncoding returns: "" (not works) > > What function returns the Content-ID? SubStr()? > If I don't know the Content-ID, the HTML will not be shown properly. Ok, you need to fetch each of the MIME objects representing each of the MIME parts. Then for each oMimeObject: oMimeObject:getHeader("Content-ID") method in superclass I've not tried this, so don't know whether it works, but the only reason it might fail is if the oMimeObject returns a header from the mail envelope rather than the current MIME object. Regards, Phil Ide --------------------- www.xbhcl.com www.pbih.eu www.idep.org.uk/xbase --------------------- Graduate, Whatsamatta U. School of Management | |
SZOLEX | Re: Content-ID on Fri, 24 Nov 2006 14:47:24 +0100 Hello Phil! If I call the "getHeader("Content-ID")" method of the oMimeMessage, it is returns NIL. If I call the "getHeader("Content-ID")" method of the oMimeContent, it is returns "Object has no method..." This is no useful. Thanks. Szolex "Phil Ide" <phil@idep.org.uk> az albbiakat rta a kvetkezo zenetben news:ue8iabocegbi.1oey3oks12yf1$.dlg@40tude.net... > Szolex, > > > //Image > > ------=_NextPart_000_0000_01C70FB4.B1A06FC0 > > Content-Type: image/jpeg; > > name="image001.jpg" > > Content-Transfer-Encoding: base64 > > Content-ID: <01C70FB4.B0EAB450> > > > > > > What is the Content-ID in this case? > > > >:getContentType() retuns: image/jpeg; > > name="image001.jpg" > >:getFileName() returns: image001.jpg > >:getcontentTransferEncoding returns: "" (not works) > > > > What function returns the Content-ID? SubStr()? :-) > > If I don't know the Content-ID, the HTML will not be shown properly. > > Ok, you need to fetch each of the MIME objects representing each of the > MIME parts. Then for each oMimeObject: > > oMimeObject:getHeader("Content-ID") // method in superclass > > I've not tried this, so don't know whether it works, but the only reason it > might fail is if the oMimeObject returns a header from the mail envelope > rather than the current MIME object. > > Regards, > -- > Phil Ide > > --------------------- > www.xbhcl.com > www.pbih.eu > www.idep.org.uk/xbase > --------------------- > Graduate, Whatsamatta U. School of Management | |
Andreas Gehrs-Pahl | Re: Content-ID on Fri, 24 Nov 2006 16:09:22 -0500 Szolex, >If I call the "getHeader("Content-ID")" method of the oMimeMessage, it is >returns NIL. >If I call the "getHeader("Content-ID")" method of the oMimeContent, it is >returns "Object has no method..." >This is no useful. The ASINet documentation for Xbase++ Version 1.9 is not very accurate and terribly incomplete! What you actually want to use is: oMimeContent:GetHeaderValue('Content-ID') This will return "<01C70FB4.B0EAB450>" in your example. The same will also work for 'Content-Type', 'Content-Transfer-Encoding', etc. If the specified Header doesn't exist, an empty string is returned. For starters, the "MimeContent" Class is not a sub-class of "MimeMessage", as the documentation says, but it is derived from the currently completely un-documented "MimeHeader" Class. You can use the debugger, trial-and-error and the very useful :ClassDescribe() method, to determine what methods and instance variables (and other Classes) are available, and what kind of parameters those methods might expect -- and if they are exported or not. HTH, -- Andreas --- --- Andreas Gehrs-Pahl E-Mail: GPahl@CharterMI.net 415 Gute Street or: Andreas@DDPSoftware.com Owosso, MI 48867-4410 or: Andreas@Aerospace-History.net Tel: (989) 723-9927 Web Site: http://www.Aerospace-History.net --- --- | |
SZOLEX | Re: Content-ID on Mon, 27 Nov 2006 14:48:20 +0100 Hi Andreas! It was very useful help! Thank you for your cooperation! Best regards! Szolex "Andreas Gehrs-Pahl" <Andreas@DDPSoftware.com> az albbiakat rta a kvetkezo zenetben news:co7hherl1xdq.fc8web618l2a.dlg@40tude.net... > Szolex, > > >If I call the "getHeader("Content-ID")" method of the oMimeMessage, it is > >returns NIL. > >If I call the "getHeader("Content-ID")" method of the oMimeContent, it is > >returns "Object has no method..." > >This is no useful. > > The ASINet documentation for Xbase++ Version 1.9 is not very accurate and > terribly incomplete! What you actually want to use is: > > oMimeContent:GetHeaderValue('Content-ID') > > This will return "<01C70FB4.B0EAB450>" in your example. The same will also > work for 'Content-Type', 'Content-Transfer-Encoding', etc. If the specified > Header doesn't exist, an empty string is returned. > > For starters, the "MimeContent" Class is not a sub-class of "MimeMessage", > as the documentation says, but it is derived from the currently completely > un-documented "MimeHeader" Class. You can use the debugger, trial-and-error > and the very useful :ClassDescribe() method, to determine what methods and > instance variables (and other Classes) are available, and what kind of > parameters those methods might expect -- and if they are exported or not. > > HTH, > > -- Andreas > > --- - -- > Andreas Gehrs-Pahl E-Mail: GPahl@CharterMI.net > 415 Gute Street or: Andreas@DDPSoftware.com > Owosso, MI 48867-4410 or: Andreas@Aerospace-History.net > Tel: (989) 723-9927 Web Site: http://www.Aerospace-History.net > --- - -- |