Author | Topic: Multipart/Mixed | |
---|---|---|
Mark Carew | Multipart/Mixed on Mon, 01 Nov 2004 18:51:42 +1000 Hi, Can anybody help me with the following code? I'm trying to build a multipart/mixed content-type email message. But having no luck. Regards Mark Using a MIMEMessage object for sending an e-mail The example demonstrates how to assemble an e-mail and send it via an SMTPCLient object to the recipient #pragma library("ASINET10.LIB") #define CRLF Chr(13)+Chr(10) PROCEDURE Main local oSmtp local oMail local oSender local oRecipient local cText local nHandle local cRawImage cRawImage := space(20000) nHandle := fopen("c:\sambahld\mag1.jpg") fread(nHandle,@cRawImage,20000) * oSender := MailAddress():new( "markcarew@magicwanddept.com.au" ) oRecipient := MailAddress():new( "markcarew@magicwanddept.com.au" ) * Assemble the e-mail * oMail := MIMEMessage():new() oMail:setContentTransferEncoding("8 Bit") oMail:setContentType([MultiPart/Mixed; boundary="0pert91iiu92039uh1235"]) oMail:setFrom ( oSender ) oMail:setSubject ( "Greetings" ) oMail:addRecipient( oRecipient ) oMail:addHeader ( "Reply-To", "markcarew@magicwanddept.com.au" ) * cText := [MIME-Version: 1.0] + CRLF cText += [Content-Type: MultiPart/Mixed;] + CRLF cText += [ boundary="0pert91iiu92039uh1235"] + CRLF cText += [--0pert91iiu92039uh1235] + CRLF cText += [Content-Type: text/plain; charset=us-ascii]+ CRLF cText += [Happy Birthday to Jane] + CRLF + CRLF cText += [Cheers] + CRLF cText += [ John] + CRLF cText += [--0pert91iiu92039uh1235] + CRLF cText += [Context-Type : Image/Jpeg] + CRLF cText += cRawImage + CRLF cText += [--0pert91iiu92039uh1235--]+ CRLF * oMail:setMessage ( cText ) * oSmtp := SMTPClient():new( "192.168.0.2" ) * IF oSmtp:connect() oSmtp:send( oMail ) oSmtp:disconnect() ? "Message sent" ELSE ? "Unable to connect to mail server" ENDIF * RETURN | |
Andreas Gehrs-Pahl | Re: Multipart/Mixed on Mon, 01 Nov 2004 07:24:30 -0500 Mark, >Can anybody help me with the following code? I'm trying to build a >multipart/mixed content-type email message. But having no luck. That's my point! With ASINET's "MIMEMessage()" class, you can't create an email message like that. The message is separated into "Headers" and a "Message Body", and you can't simply add the Message Text, and expect some of it to be treated as Headers, and some as the Message Body. For multi-part messages, you have to use the ":AttachFile()" method, and that does not give you any control over the Content Type or the Content Encoding used. You can (theoretically) use the methods ":SetContentTransferEncoding()" and ":SetContentType()", but this setting will apply to the email as a whole, and the setting is ignored (and automatically changed to "multipart/mixed"), if you attach a file with the ":AttachFile()" method. Therefore, you do not have any control at all, unless you write your own SMTP, POP3, MimeMessage, etc. classes from scratch using the ASINET Raw Socket Classes, which would be ridiculous. There isn't even the possibility to sub-class and extend some of the functionality! This is the same problem that exists with the (extremely) limited functionality that was implemented for ASINET's "FTPClient()". One option would be to use See4XB from Marshall Soft, or to lobby Alaska to fix (open up) their ASINET library. But I wouldn't hold my breath on that to happen anytime soon. -- 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 --- --- | |
Anand Gupta | Re: Multipart/Mixed on Mon, 01 Nov 2004 18:12:41 +0530 I recall someone giving a *hint*, here to hack the DLL (just a Hex Hack I guess) to fix the problem.. Since we arent' using SMTP to send email's (I still prefer posting to the native email client and let the email software handle the rest), using the Steffen's code posted here long time ago Anand "Andreas Gehrs-Pahl" <Andreas@DDPSoftware.com> wrote in message news:1edujlqvjm073.au0m6hhtb4k4.dlg@40tude.net... > Mark, > > >Can anybody help me with the following code? I'm trying to build a > >multipart/mixed content-type email message. But having no luck. > > That's my point! With ASINET's "MIMEMessage()" class, you can't create an > email message like that. The message is separated into "Headers" and a > "Message Body", and you can't simply add the Message Text, and expect some > of it to be treated as Headers, and some as the Message Body. For multi-part > messages, you have to use the ":AttachFile()" method, and that does not give > you any control over the Content Type or the Content Encoding used. > > You can (theoretically) use the methods ":SetContentTransferEncoding()" and > ":SetContentType()", but this setting will apply to the email as a whole, > and the setting is ignored (and automatically changed to "multipart/mixed"), > if you attach a file with the ":AttachFile()" method. > > Therefore, you do not have any control at all, unless you write your own > SMTP, POP3, MimeMessage, etc. classes from scratch using the ASINET Raw > Socket Classes, which would be ridiculous. There isn't even the possibility > to sub-class and extend some of the functionality! This is the same problem > that exists with the (extremely) limited functionality that was implemented > for ASINET's "FTPClient()". > > One option would be to use See4XB from Marshall Soft, or to lobby Alaska to > fix (open up) their ASINET library. But I wouldn't hold my breath on that > to happen anytime soon. > > -- 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 > --- - -- | |
Mark Carew | Re: Multipart/Mixed on Tue, 02 Nov 2004 05:45:18 +1000 Hi Anand, What if you don't want the user to have an email client and just want to use this software to send created emails via the network email gateway. Seems all we can send with asinet is multilple emails to allow multipart content. I agree with andreas that subclassing of the mimemessage class to allow this type of recursive creation would be the answer; but after six frustrating years of waiting for pitch drops to fall, I think I will look for another solution. Regards Mark "Anand Gupta" <agREMOVE_at_coralindiaREMOVE_dot_com> wrote in message news:DHJRLBBwEHA.6272@S15147418... > I recall someone giving a *hint*, here to hack the DLL (just a Hex Hack I > guess) to fix the problem.. > > Since we arent' using SMTP to send email's (I still prefer posting to the > native email client and let the email software handle the rest), using the > Steffen's code posted here long time ago > > Anand > > "Andreas Gehrs-Pahl" <Andreas@DDPSoftware.com> wrote in message > news:1edujlqvjm073.au0m6hhtb4k4.dlg@40tude.net... > > Mark, > > > > >Can anybody help me with the following code? I'm trying to build a > > >multipart/mixed content-type email message. But having no luck. > > > > That's my point! With ASINET's "MIMEMessage()" class, you can't create an > > email message like that. The message is separated into "Headers" and a > > "Message Body", and you can't simply add the Message Text, and expect some > > of it to be treated as Headers, and some as the Message Body. For > multi-part > > messages, you have to use the ":AttachFile()" method, and that does not > give > > you any control over the Content Type or the Content Encoding used. > > > > You can (theoretically) use the methods ":SetContentTransferEncoding()" > and > > ":SetContentType()", but this setting will apply to the email as a whole, > > and the setting is ignored (and automatically changed to > "multipart/mixed"), > > if you attach a file with the ":AttachFile()" method. > > > > Therefore, you do not have any control at all, unless you write your own > > SMTP, POP3, MimeMessage, etc. classes from scratch using the ASINET Raw > > Socket Classes, which would be ridiculous. There isn't even the > possibility > > to sub-class and extend some of the functionality! This is the same > problem > > that exists with the (extremely) limited functionality that was > implemented > > for ASINET's "FTPClient()". > > > > One option would be to use See4XB from Marshall Soft, or to lobby Alaska > to > > fix (open up) their ASINET library. But I wouldn't hold my breath on that > > to happen anytime soon. > > > > -- 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 > - > -- > > | |
Peter Alderliesten | Re: Multipart/Mixed on Mon, 01 Nov 2004 16:33:42 +0100 Andreas, > Therefore, you do not have any control at all, unless you write your own > SMTP, POP3, MimeMessage, etc. classes from scratch using the ASINET Raw > Socket Classes, which would be ridiculous. There isn't even the possibility > to sub-class and extend some of the functionality! This is the same problem > that exists with the (extremely) limited functionality that was implemented > for ASINET's "FTPClient()". > > One option would be to use See4XB from Marshall Soft, or to lobby Alaska to > fix (open up) their ASINET library. But I wouldn't hold my breath on that > to happen anytime soon. And I thought that the message from Alaska: Automated HTML eMAIL support There is no need to painfully compose eMails within your application. Send off your pre-formatted HTML emails with a snap of a finger! was there to fix your problem!!! Peter | |
Mark Carew | Re: Multipart/Mixed on Tue, 02 Nov 2004 05:58:46 +1000 Hi Peter, I suppose the thing to do is to get the C source code for mozilla firebird. Strip out the composition stuff and create a windows dll that xbase++ can call. Then we can get to use xbase to send multipart emails. Gee isn't it great to have to keep reinventing the wheel. I bet Alaska, reading our frustration, are wetting themselves laughing over their friday stein-largers at our expense. Regards Mark "Peter Alderliesten" <p.alderliesten@emergo-systems.nl> wrote in message news:x4gby0szhlnd.1m2c60x2rqva5$.dlg@40tude.net... > Andreas, > > > Therefore, you do not have any control at all, unless you write your own > > SMTP, POP3, MimeMessage, etc. classes from scratch using the ASINET Raw > > Socket Classes, which would be ridiculous. There isn't even the possibility > > to sub-class and extend some of the functionality! This is the same problem > > that exists with the (extremely) limited functionality that was implemented > > for ASINET's "FTPClient()". > > > > One option would be to use See4XB from Marshall Soft, or to lobby Alaska to > > fix (open up) their ASINET library. But I wouldn't hold my breath on that > > to happen anytime soon. > > And I thought that the message from Alaska: > Automated HTML eMAIL support > There is no need to painfully compose eMails within your application. > Send off your pre-formatted HTML emails with a snap of a finger! > > was there to fix your problem!!! > > Peter | |
Andreas Gehrs-Pahl | Re: Multipart/Mixed on Mon, 01 Nov 2004 15:00:08 -0500 Peter, >And I thought that the message from Alaska: > Automated HTML eMAIL support > There is no need to painfully compose eMails within your application. > Send off your pre-formatted HTML emails with a snap of a finger! >was there to fix your problem!!! I don't know. The phrase "painfully" is appropriate, but the sentence as a whole "There is no need to painfully compose eMails within your application" is too optimistic, as it was never (and still is not) possible to manually create a multipart email message with ASINET. I have a suspicion that the above-mentioned HTML-email "feature" isn't a solution for this multipart email problem -- never mind that I despise HTML emails, and wouldn't want to send any! I had very little time when the Xbase++ 1.9 Beta started -- and I still have very little time to spare -- so I didn't apply to do any beta testing this time. And I didn't expect this to be such an extremely long beta cycle, or I might have joined in. I assume (actually hope) that it is now too late to participate in the beta test! Are you a beta-participant and have you tested the updated ASINET library, and have you found that it is now possible to manually create multipart messages? If the answer is "yes" to all parts of the question, I would be extremely happy, and pleasantly surprised about Alaska's change of mind! -- Andreas PS: I usually prefer a Function-based programming style to the more Clipper-like Command-based style -- which makes excessive use of the pre-processor -- so I never used the SNAP FINGER command up to now. But I just tried it, and it does not seem to work. Either my computer is blind and deaf -- or simply ignores me. Maybe I should try with a treat instead. --- --- 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 --- --- | |
Mark Carew | Re: Multipart/Mixed on Tue, 02 Nov 2004 06:10:51 +1000 Hi Andreas, In some circles HTML emails are considered just plain dangerous as they can contain viruses. I wonder why they are being touted as a solution to multipart emails when the technology already exists RFC 1521, RFC 882. I even know some isp's that bounce any HTML emails sent to their customers. So how can HTML emails be suggested as a generic solution to and replacement of this seemingly straight forward technology. Totally Agree Regards Mark "Andreas Gehrs-Pahl" <Andreas@DDPSoftware.com> wrote in message news:9ieil8i8fd3e$.1jw1kuwwje12j$.dlg@40tude.net... > Peter, > > >And I thought that the message from Alaska: > > Automated HTML eMAIL support > > There is no need to painfully compose eMails within your application. > > Send off your pre-formatted HTML emails with a snap of a finger! > >was there to fix your problem!!! > > I don't know. The phrase "painfully" is appropriate, but the sentence as a > whole "There is no need to painfully compose eMails within your application" > is too optimistic, as it was never (and still is not) possible to manually > create a multipart email message with ASINET. > > I have a suspicion that the above-mentioned HTML-email "feature" isn't a > solution for this multipart email problem -- never mind that I despise HTML > emails, and wouldn't want to send any! > > I had very little time when the Xbase++ 1.9 Beta started -- and I still have > very little time to spare -- so I didn't apply to do any beta testing this > time. And I didn't expect this to be such an extremely long beta cycle, or I > might have joined in. I assume (actually hope) that it is now too late to > participate in the beta test! > > Are you a beta-participant and have you tested the updated ASINET library, > and have you found that it is now possible to manually create multipart > messages? If the answer is "yes" to all parts of the question, I would be > extremely happy, and pleasantly surprised about Alaska's change of mind! > > -- Andreas > > PS: I usually prefer a Function-based programming style to the more > Clipper-like Command-based style -- which makes excessive use of the > pre-processor -- so I never used the SNAP FINGER command up to now. But I > just tried it, and it does not seem to work. Either my computer is blind and > deaf -- or simply ignores me. Maybe I should try with a treat instead. > > --- - -- > 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 > --- - -- | |
Andreas Gehrs-Pahl | Re: Multipart/Mixed on Mon, 01 Nov 2004 15:38:12 -0500 Mark, >So how can HTML emails be suggested as a generic solution to and replacement >of this seemingly straight forward technology. You can send multipart emails with ASINET -- you just can't create them manually, from scratch! You can add a Message Body, and attach as many files as you like, using the ":AttachFile()" method. And with 1.82.306, most of your attached files will be base64-encoded, and therefore without corruptions. I would just prefer to have more control over the message and all its parts, and not being forced to completely rely on the built-in ASINET behavior. But starting with 1.82.306, ASINET's SMTP Client is now able to create and send multipart emails that are valid and not corrupted, as long as you use ":AttachFile()". -- 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 --- --- | |
Mark Carew | Re: Multipart/Mixed on Tue, 02 Nov 2004 08:20:55 +1000 Hi Andreas, I wanted to have inline rather tha attached images. Maybe I need to have another look at attachfile() Regards Mark > > >So how can HTML emails be suggested as a generic solution to and replacement > >of this seemingly straight forward technology. > > You can send multipart emails with ASINET -- you just can't create them > manually, from scratch! You can add a Message Body, and attach as many files > as you like, using the ":AttachFile()" method. And with 1.82.306, most of > your attached files will be base64-encoded, and therefore without > corruptions. > > I would just prefer to have more control over the message and all its parts, > and not being forced to completely rely on the built-in ASINET behavior. But > starting with 1.82.306, ASINET's SMTP Client is now able to create and send > multipart emails that are valid and not corrupted, as long as you use > ":AttachFile()". > > -- 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 > --- - -- | |
Mark Carew | Re: Multipart/Mixed on Tue, 02 Nov 2004 08:23:12 +1000 From the docs "This method can be used to attach files to an e-mail message that do not contribute to the textual content of the message. This applies mainly to files containing binary data, such as compressed ZIP archives or image files" I want the image to be part of the message body without sitting on top as an attachment. "Andreas Gehrs-Pahl" <Andreas@DDPSoftware.com> wrote in message news:1nh9pgp1y5uhi.f76eoglxj871.dlg@40tude.net... > Mark, > > >So how can HTML emails be suggested as a generic solution to and replacement > >of this seemingly straight forward technology. > > You can send multipart emails with ASINET -- you just can't create them > manually, from scratch! You can add a Message Body, and attach as many files > as you like, using the ":AttachFile()" method. And with 1.82.306, most of > your attached files will be base64-encoded, and therefore without > corruptions. > > I would just prefer to have more control over the message and all its parts, > and not being forced to completely rely on the built-in ASINET behavior. But > starting with 1.82.306, ASINET's SMTP Client is now able to create and send > multipart emails that are valid and not corrupted, as long as you use > ":AttachFile()". > > -- 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 > --- - -- | |
Andreas Gehrs-Pahl | Re: Multipart/Mixed on Mon, 01 Nov 2004 18:42:47 -0500 Mark, >I want the image to be part of the message body without sitting on top as an >attachment. I fail to see the difference between what you call "inline" and "attached" files. The resulting email looks just the same to an email reader. The MIME Header "multipart/mixed" means that the email has attachments. Your example code would -- if it would actually work with ASINET and if you remove the typos and correct it otherwise -- create an email with two attachments, a text and a picture. Just in case you asked. The typos/errors are: * All MIME Content-Types should be specified in lower case. * The Header line "Context-Type" should read "Content-Type" * You need an empty line after the last "Header" line and before your body text (or in your case, before the Content Boundary) starts. But there will be already an empty line created by ASINET in front of your "body", so the Header lines you added in the body will be ignored by any email reader, as they are considered part of the message body! * You do not specify the Content Encoding for your picture, and you do not seem to encode it (with base64 encoding), so it will (most-likely) not be possible to send this correctly, anyway. If you create your email with ASINET, using the following code, and then look at the resulting (raw) email, including headers, you will see that it will look (virtually) the same, as the one you wanted to create manually in the first place: #pragma library("ASINET10.LIB") #define CRLF Chr(13)+Chr(10) Procedure Main() LOCAL oMail := MIMEMessage():New() LOCAL oSender := MailAddress():New("MarkCarew@MagicWandDept.com.au") LOCAL oRecipient := MailAddress():New("MarkCarew@MagicWandDept.com.au") LOCAL oSmtp := SMTPClient():New("192.168.0.2") LOCAL cText := "Happy Birthday to Jane" + CRLF + CRLF cText += "Cheers" + CRLF cText += " John" + CRLF if oSmtp:Connect() oMail:SetSubject("Greetings") oMail:SetFrom(oSender) oMail:AddRecipient(oRecipient) oMail:AddHeader("Reply-To", "Mark <MarkCarew@MagicWandDept.com.au>") oMail:SetMessage(cText) oMail:AttachFile("c:\sambahld\mag1.jpg") if oSmtp:Send(oMail) ? "Message sent" else ? "Unable to send mail" endif oSmtp:Disconnect() else ? "Unable to connect to mail server" endif return -- 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 --- --- | |
Mark Carew | Re: Multipart/Mixed on Tue, 02 Nov 2004 17:01:46 +1000 Thank you very much Andreas. You have been most helpful. I'll try your sample code. No doubt it will work. Regards Mark > > >I want the image to be part of the message body without sitting on top as an > >attachment. > > I fail to see the difference between what you call "inline" and "attached" > files. The resulting email looks just the same to an email reader. The MIME > Header "multipart/mixed" means that the email has attachments. Your example > code would -- if it would actually work with ASINET and if you remove the > typos and correct it otherwise -- create an email with two attachments, a > text and a picture. > > Just in case you asked. The typos/errors are: > * All MIME Content-Types should be specified in lower case. > * The Header line "Context-Type" should read "Content-Type" > * You need an empty line after the last "Header" line and before your body > text (or in your case, before the Content Boundary) starts. But there will > be already an empty line created by ASINET in front of your "body", so the > Header lines you added in the body will be ignored by any email reader, as > they are considered part of the message body! > * You do not specify the Content Encoding for your picture, and you do not > seem to encode it (with base64 encoding), so it will (most-likely) not be > possible to send this correctly, anyway. > > If you create your email with ASINET, using the following code, and then > look at the resulting (raw) email, including headers, you will see that it > will look (virtually) the same, as the one you wanted to create manually in > the first place: > > #pragma library("ASINET10.LIB") > > #define CRLF Chr(13)+Chr(10) > > Procedure Main() > LOCAL oMail := MIMEMessage():New() > LOCAL oSender := MailAddress():New("MarkCarew@MagicWandDept.com.au") > LOCAL oRecipient := MailAddress():New("MarkCarew@MagicWandDept.com.au") > LOCAL oSmtp := SMTPClient():New("192.168.0.2") > LOCAL cText := "Happy Birthday to Jane" + CRLF + CRLF > cText += "Cheers" + CRLF > cText += " John" + CRLF > > if oSmtp:Connect() > oMail:SetSubject("Greetings") > oMail:SetFrom(oSender) > oMail:AddRecipient(oRecipient) > oMail:AddHeader("Reply-To", "Mark <MarkCarew@MagicWandDept.com.au>") > oMail:SetMessage(cText) > oMail:AttachFile("c:\sambahld\mag1.jpg") > > if oSmtp:Send(oMail) > ? "Message sent" > else > ? "Unable to send mail" > endif > oSmtp:Disconnect() > else > ? "Unable to connect to mail server" > endif > return > > -- 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 > --- - -- | |
Phil Ide | Re: Multipart/Mixed on Tue, 02 Nov 2004 16:13:05 +0000 Mark, > "This method can be used to attach files to an e-mail message that do not > contribute to the textual content of the message. This applies mainly to > files containing binary data, such as compressed ZIP archives or image > files" > > I want the image to be part of the message body without sitting on top as an > attachment. This is pretty easy to do once you know the mechanism, but unfortunately not using ASINET. Open Outlook or Outlook Express and create an email with an image embedded, and send it to yourself. When you collect the email, use a proper email client that allows you to view the raw message, or at least save the raw message to disk. You'll see that the message is build as a multipart message, but in the <img> tag you'll see the source as referencing one of the parts. The problem is, when you compose the message body, you need to know the name of the part you need to reference, so what you would really need is a class that allows you to attach a file (img), determine it's attachment-name, then compose and assert the message body. Regards, Phil Ide *************************************** * Xbase++ FAQ, Libraries and Sources: * * goto: http://www.idep.org.uk/xbase * *************************************** Disk Error on C: - (A)bort, (R)etry, (D)estruct | |
Mark Carew | Re: Multipart/Mixed on Wed, 03 Nov 2004 06:40:49 +1000 Hi Phil, Thanks for the info I'm still reading RFC 1521 and RFC 882 and RFC 881 and there is this thing called context-id maybe thats the forward reference. Its just such a huge pity that asinet isn't intelligent enough to allow the creation of multipart/mixed mime content. I have both outlook express and mozilla firebird in use. Cause firebird does'nt seem to do news groups very well and I don't want to trust my email to Outlook anymore, so I'll give it a go. I think the only solution is to learn how to use marshallsoft, which just installs without any glitches and seems to come with good references. Thanks Mark "Phil Ide" <phil@idep.org.uk> wrote in message news:17pkxqtz7earl.dlg@idep.org.uk... > Mark, > > > "This method can be used to attach files to an e-mail message that do not > > contribute to the textual content of the message. This applies mainly to > > files containing binary data, such as compressed ZIP archives or image > > files" > > > > I want the image to be part of the message body without sitting on top as an > > attachment. > > This is pretty easy to do once you know the mechanism, but unfortunately > not using ASINET. > > Open Outlook or Outlook Express and create an email with an image embedded, > and send it to yourself. When you collect the email, use a proper email > client that allows you to view the raw message, or at least save the raw > message to disk. > > You'll see that the message is build as a multipart message, but in the > <img> tag you'll see the source as referencing one of the parts. > > The problem is, when you compose the message body, you need to know the > name of the part you need to reference, so what you would really need is a > class that allows you to attach a file (img), determine it's > attachment-name, then compose and assert the message body. > > Regards, > -- > Phil Ide > > *************************************** > * Xbase++ FAQ, Libraries and Sources: * > * goto: http://www.idep.org.uk/xbase * > *************************************** > > Disk Error on C: - (A)bort, (R)etry, (D)estruct | |
Peter Alderliesten | Re: Multipart/Mixed on Wed, 03 Nov 2004 10:00:03 +0100 Andreas, > Are you a beta-participant and have you tested the updated ASINET library .. No I am actually in the same fix as Alaska is, more than a year overdue with a very much wanted new release. So I am as much sticking to programming work as possible, to try and get a new version available in the coming three moinths. Only I just got a question if is would be possible to connect my app to Outlook as weel as Groupwise. That made me look into the email story. Peter | |
Hannes Ziegler | Re: Multipart/Mixed on Sat, 06 Nov 2004 04:07:35 +0100 Peter Alderliesten wrote: > > Andreas, > > > Are you a beta-participant and have you tested the updated ASINET library .. > > No I am actually in the same fix as Alaska is, more than a year overdue > with a very much wanted new release. So I am as much sticking to > programming work as possible, to try and get a new version available in the > coming three moinths. Only I just got a question if is would be possible to > connect my app to Outlook as weel as Groupwise. That made me look into the > email story. > forget about every expectation you have about Alaska unless you shake your hand with Steffen and sign a contract. For the holes in the ASINET library you are well advised to check the Cockpit library from Michael. Just a hint -- Hannes | |
Mark Carew | Re: Multipart/Mixed on Mon, 08 Nov 2004 15:37:52 +1000 Hi Hannes, We need look no further than maschallsoft, see4xb. It even comes with source code examples. Regards Mark For the holes in the ASINET library you are well advised to check the > Cockpit library from Michael. > > Just a hint > -- > Hannes | |
Mark Carew | Re: Multipart/Mixed on Tue, 02 Nov 2004 05:39:14 +1000 Hi "Andreas Gehrs-Pahl" Yep, just as I thought. Another completely useless, non-working, expensive add on to trick people into buying the professional subscription. So you can read emails sent to you and pick out the individual multipart pieces but not create them. Thanks for the clarification. Regards Mark <Andreas@DDPSoftware.com> wrote in message news:1edujlqvjm073.au0m6hhtb4k4.dlg@40tude.net... > Mark, > > >Can anybody help me with the following code? I'm trying to build a > >multipart/mixed content-type email message. But having no luck. > > That's my point! With ASINET's "MIMEMessage()" class, you can't create an > email message like that. The message is separated into "Headers" and a > "Message Body", and you can't simply add the Message Text, and expect some > of it to be treated as Headers, and some as the Message Body. For multi-part > messages, you have to use the ":AttachFile()" method, and that does not give > you any control over the Content Type or the Content Encoding used. > > You can (theoretically) use the methods ":SetContentTransferEncoding()" and > ":SetContentType()", but this setting will apply to the email as a whole, > and the setting is ignored (and automatically changed to "multipart/mixed"), > if you attach a file with the ":AttachFile()" method. > > Therefore, you do not have any control at all, unless you write your own > SMTP, POP3, MimeMessage, etc. classes from scratch using the ASINET Raw > Socket Classes, which would be ridiculous. There isn't even the possibility > to sub-class and extend some of the functionality! This is the same problem > that exists with the (extremely) limited functionality that was implemented > for ASINET's "FTPClient()". > > One option would be to use See4XB from Marshall Soft, or to lobby Alaska to > fix (open up) their ASINET library. But I wouldn't hold my breath on that > to happen anytime soon. > > -- 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 > --- - -- | |
Jim Graham | Re: Multipart/Mixed on Mon, 01 Nov 2004 14:53:57 -0500 Mark, You should try the Marshall Soft library. I have been using it for years to send HTML formatted email. It's only $105.00 US. "Mark Carew" <markcarew@magicwanddept.com.au> wrote in message news:lZ3yppEwEHA.6512@S15147418... > > Hi "Andreas Gehrs-Pahl" > > Yep, just as I thought. Another completely useless, non-working, > expensive add on to trick people into buying the professional subscription. > So you can read emails sent to you and pick out the individual multipart > pieces but not create them. > > Thanks for the clarification. > Regards Mark > > <Andreas@DDPSoftware.com> wrote in message > news:1edujlqvjm073.au0m6hhtb4k4.dlg@40tude.net... > > Mark, > > > > >Can anybody help me with the following code? I'm trying to build a > > >multipart/mixed content-type email message. But having no luck. > > > > That's my point! With ASINET's "MIMEMessage()" class, you can't create an > > email message like that. The message is separated into "Headers" and a > > "Message Body", and you can't simply add the Message Text, and expect some > > of it to be treated as Headers, and some as the Message Body. For > multi-part > > messages, you have to use the ":AttachFile()" method, and that does not > give > > you any control over the Content Type or the Content Encoding used. > > > > You can (theoretically) use the methods ":SetContentTransferEncoding()" > and > > ":SetContentType()", but this setting will apply to the email as a whole, > > and the setting is ignored (and automatically changed to > "multipart/mixed"), > > if you attach a file with the ":AttachFile()" method. > > > > Therefore, you do not have any control at all, unless you write your own > > SMTP, POP3, MimeMessage, etc. classes from scratch using the ASINET Raw > > Socket Classes, which would be ridiculous. There isn't even the > possibility > > to sub-class and extend some of the functionality! This is the same > problem > > that exists with the (extremely) limited functionality that was > implemented > > for ASINET's "FTPClient()". > > > > One option would be to use See4XB from Marshall Soft, or to lobby Alaska > to > > fix (open up) their ASINET library. But I wouldn't hold my breath on that > > to happen anytime soon. > > > > -- 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 > - > -- > > | |
Mark Carew | Re: Multipart/Mixed on Tue, 02 Nov 2004 06:00:15 +1000 Hi Jim, Maybe alaska can reimburse me the $105 so that I can get the functioanlity that asimet is supposed to deliver. Regards Mark "Jim Graham" <jgraham@proteledata.com> wrote in message news:HAJy5xEwEHA.6272@S15147418... > Mark, > > You should try the Marshall Soft library. I have been using it for years to > send HTML formatted email. It's only $105.00 US. > > "Mark Carew" <markcarew@magicwanddept.com.au> wrote in message > news:lZ3yppEwEHA.6512@S15147418... > > > > Hi "Andreas Gehrs-Pahl" > > > > Yep, just as I thought. Another completely useless, non-working, > > expensive add on to trick people into buying the professional > subscription. > > So you can read emails sent to you and pick out the individual multipart > > pieces but not create them. > > > > Thanks for the clarification. > > Regards Mark > > > > <Andreas@DDPSoftware.com> wrote in message > > news:1edujlqvjm073.au0m6hhtb4k4.dlg@40tude.net... > > > Mark, > > > > > > >Can anybody help me with the following code? I'm trying to build a > > > >multipart/mixed content-type email message. But having no luck. > > > > > > That's my point! With ASINET's "MIMEMessage()" class, you can't create > an > > > email message like that. The message is separated into "Headers" and a > > > "Message Body", and you can't simply add the Message Text, and expect > some > > > of it to be treated as Headers, and some as the Message Body. For > > multi-part > > > messages, you have to use the ":AttachFile()" method, and that does not > > give > > > you any control over the Content Type or the Content Encoding used. > > > > > > You can (theoretically) use the methods ":SetContentTransferEncoding()" > > and > > > ":SetContentType()", but this setting will apply to the email as a > whole, > > > and the setting is ignored (and automatically changed to > > "multipart/mixed"), > > > if you attach a file with the ":AttachFile()" method. > > > > > > Therefore, you do not have any control at all, unless you write your own > > > SMTP, POP3, MimeMessage, etc. classes from scratch using the ASINET Raw > > > Socket Classes, which would be ridiculous. There isn't even the > > possibility > > > to sub-class and extend some of the functionality! This is the same > > problem > > > that exists with the (extremely) limited functionality that was > > implemented > > > for ASINET's "FTPClient()". > > > > > > One option would be to use See4XB from Marshall Soft, or to lobby Alaska > > to > > > fix (open up) their ASINET library. But I wouldn't hold my breath on > that > > > to happen anytime soon. > > > > > > -- 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 > > > - > > -- > > > > > > | |
Jim Graham | Re: Multipart/Mixed on Mon, 01 Nov 2004 16:50:03 -0500 Mark, I understand your frustration. I was just glad to get the job done and it was worth the $105.00 not to have to dick around with that problem anymore... Hmmmm, I think that I might have even done this before ASINET was released... "Mark Carew" <markcarew@magicwanddept.com.au> wrote in message news:ZZYrX1EwEHA.6512@S15147418... > Hi Jim, > Maybe alaska can reimburse me the $105 so that I can get the > functioanlity that asimet is supposed to deliver. > Regards Mark > > "Jim Graham" <jgraham@proteledata.com> wrote in message > news:HAJy5xEwEHA.6272@S15147418... > > Mark, > > > > You should try the Marshall Soft library. I have been using it for years > to > > send HTML formatted email. It's only $105.00 US. > > > > "Mark Carew" <markcarew@magicwanddept.com.au> wrote in message > > news:lZ3yppEwEHA.6512@S15147418... > > > > > > Hi "Andreas Gehrs-Pahl" > > > > > > Yep, just as I thought. Another completely useless, non-working, > > > expensive add on to trick people into buying the professional > > subscription. > > > So you can read emails sent to you and pick out the individual multipart > > > pieces but not create them. > > > > > > Thanks for the clarification. > > > Regards Mark > > > > > > <Andreas@DDPSoftware.com> wrote in message > > > news:1edujlqvjm073.au0m6hhtb4k4.dlg@40tude.net... > > > > Mark, > > > > > > > > >Can anybody help me with the following code? I'm trying to build a > > > > >multipart/mixed content-type email message. But having no luck. > > > > > > > > That's my point! With ASINET's "MIMEMessage()" class, you can't create > > an > > > > email message like that. The message is separated into "Headers" and a > > > > "Message Body", and you can't simply add the Message Text, and expect > > some > > > > of it to be treated as Headers, and some as the Message Body. For > > > multi-part > > > > messages, you have to use the ":AttachFile()" method, and that does > not > > > give > > > > you any control over the Content Type or the Content Encoding used. > > > > > > > > You can (theoretically) use the methods > ":SetContentTransferEncoding()" > > > and > > > > ":SetContentType()", but this setting will apply to the email as a > > whole, > > > > and the setting is ignored (and automatically changed to > > > "multipart/mixed"), > > > > if you attach a file with the ":AttachFile()" method. > > > > > > > > Therefore, you do not have any control at all, unless you write your > own > > > > SMTP, POP3, MimeMessage, etc. classes from scratch using the ASINET > Raw > > > > Socket Classes, which would be ridiculous. There isn't even the > > > possibility > > > > to sub-class and extend some of the functionality! This is the same > > > problem > > > > that exists with the (extremely) limited functionality that was > > > implemented > > > > for ASINET's "FTPClient()". > > > > > > > > One option would be to use See4XB from Marshall Soft, or to lobby > Alaska > > > to > > > > fix (open up) their ASINET library. But I wouldn't hold my breath on > > that > > > > to happen anytime soon. > > > > > > > > -- 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 > > > > > - > > > -- > > > > > > > > > > > > | |
Mark Carew | Re: Multipart/Mixed on Sun, 28 Nov 2004 07:53:15 +1000 Hi All, The solution to my problem was to purchase marshallsoft's see4xb. It does every thing that asinet will never do. Regards Mark |