Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rewriting CEmail, CSmtp & CMessage to email inserted image

192 views
Skip to first unread message

Phil bayard

unread,
Jan 9, 2013, 7:03:20 AM1/9/13
to
Hi everyone,

i'm working for a long time on the rewriting of the Internet SDK classes. (Still working with the SP3)
Indeed, we have a need of sending email from VO which are made of :

- Text
- HTML with image
- Other files along with the email

What i have seen in VO is that it's possible to do everything except
- HTML with image

Indeed, the creation of the email doesnt take care of boundary like multipart/related.

An email is supposed to be like this in my case :

Mixed boundary
---Related boundary -> Not existing in VO
------Alternative boundary
---------Text part
------Alternative boundary
---------HTML part
---Related boundary -> Not existing in VO
------Images part -> Not existing in VO
Mixed boundary
---Files which are not in the html
Mixed boundary


I did try to simply define the email as a related part. But my pdf files wasnt visible in all outlook version and some other clients.
So i came back to the multipart/mixed version.

Did someone ever rewrite those classes?
I'm looking where exactly in the CEmail and CSMTP classes the content is listed in order to create another array with my image and handle a new type of boundary (related) in the steamout function

But if you have advises for me on a good way to do it i would be really happy ;)

Thank you for reading me!
JPB

Willie Moore

unread,
Jan 9, 2013, 8:54:19 AM1/9/13
to
Phil,

This is probably not what you would like to hear but I would really go with
a dotNet solution that you can call from your VO app. The mail classes in
dotNet are really easy to work with. Syntactically they are very close to
the VO classes in the way that they work. But they support all of the
different network credentials, ssl, etc. You can easily wrap the dotNet dll
in COM and call it fro VO.

Regards,
Willie
Vulcan VIP

"Phil bayard" wrote in message
news:4616078a-e0c4-4d1b...@googlegroups.com...

Phil bayard

unread,
Jan 9, 2013, 9:09:15 AM1/9/13
to
Hi Willie,

I did look on the newsgroups and i found nothing, so i suppose that everyone who wanted the same thing did the way you said.

But i'm pretty sure that rewriting the one in VO wouldnt be so difficult with one more array of file related to the html part.

Anyway I'll take a look on the dotNet version and i'll try a wrapper.

Thank for the answer !
Regards,
Phil

Ginny Caughey

unread,
Jan 9, 2013, 10:53:54 AM1/9/13
to
Here's PDF that describes how to do the wrapper if you need it:
http://www.elbe-data.se/sv/VOgrafx/visualobjectsandcsharp.pdf

I agree with Willie's advice by the way.

Ginny

"Phil bayard" wrote in message
news:c7f41b8d-cca6-46ad...@googlegroups.com...

Jamal

unread,
Jan 9, 2013, 6:26:15 PM1/9/13
to
Phil,

You can probably use an activex DLL like Chillkat or MailBee.

For example with MailBee, you can embed your images with something like:

Email HTML source:

<img border="0" src="cid:yourpic">

In your code:
// init smtp object first, then

oSMTP:BodyFormat := 1 // HTML

oSmtp:AddAttachment(cLogoFile, NIL, "yourpic") // this embeds image

// then send


Jamal

"Phil bayard" wrote in message
news:4616078a-e0c4-4d1b...@googlegroups.com...

Phil bayard

unread,
Jan 10, 2013, 5:34:26 AM1/10/13
to
@Ginny

Thank for the PDF, you gave it to me once for another post i think, it's really nice and i use it often ;)

@Jamal

I think i'll go for a C# wrapper because i prefer to code it myself(adaptive code and debug) and the c# library seems really simple to use.

Thank you both for help


Phil bayard

unread,
Jan 16, 2013, 5:12:09 AM1/16/13
to
i wrote a small c# class and it works pretty well, just that in VO i was able to have a progress bar of the sending, and not anymore in c# but the error handler is quite beter in c#

c# wrappers are really a nice thing !

Willie Moore

unread,
Jan 16, 2013, 6:28:51 AM1/16/13
to
Phil,

Vulcan.net wrappers are good too. Using dotNet to extend the life of your
mission critical VO apps is the smart approach. Eventually you will have a
true dotNet app

Regards,
Willie
Vulcan VIP

"Phil bayard" wrote in message
news:a579a57d-8784-4fd1...@googlegroups.com...
0 new messages