Do what I do. Use late binding in your examples. This way, you don't
need to post the interfaces.
------------------
Announcement
Collapse
No announcement yet.
HTML Email from Source Code forum
Collapse
X
-
Guest replied
-
Thanks for the clarification. Sure didn't mean to kick up a big
storm, just found something that works extremely well for me and
wanted to share it with the group.
Anyway, I'll most likely try to limit the COM examples due to
licensing and other issues.
-Ken
------------------
Leave a comment:
-
Originally posted by Ken Myers:
Other good reasons to use CDO:
1) It avoids the prompt that comes up saying "An application is
trying to send an email..." that makes MAPI unusable in some environments.
but it is not true of all CDO (i.e. updated version of CDO.DLL).
Your program using CDONTS works for you because you have IIS SMTP running
and setup to deliver/relay your mail.
Gerald W. Gaston
Leave a comment:
-
Originally posted by Mark Dotson:
DIM myMail AS CDONTSNewMail
I get undefined type using Windows XP Pro.
Gerald W. Gaston
Leave a comment:
-
Originally posted by Tom Hanlin:
It would be prudent to check the copyright license for the COM object
in question. You may need a developer's license in order to use an
object with your program, for example. It's a pity that Microsoft
didn't supply a "license" field next to the "copyright" field. As it
stands, finding the license information may be rather a chore. Check
with the copyright owner.
program for it, you just can't redistribute the library. Not sure how
exactly that relates to distributing an include file for it though.
Microsoft use to allow the redistribution of CDO.DLL, but now there is
NO version of CDO that can be redistributed. Note the library used in
this thread, CDONTS.DLL, was never redistributable. i.e. you must
install IIS 4.0-5.0 (or MCIS or Exhange 5.5 with IMS) for CDONTS. It does
not come with IIS 5.1 or up as you are expected to use the improved
CDOSYS that comes with W2K and up.
For nothing else other than this fact (CDOSYS comes w/ W2K and up), I
would switch to using CDOSYS and allow specifying an SMTP server
(or chose delivery type).
I replied to the thread in the Source Code forum (different info) before
I remembered how you guys did things here (code in Source Code and talk
about it here), and they made more sense as replies there too I guess.
Anyway sorry for posting in the wrong place.
Gerald W. Gaston
[This message has been edited by Gerald W. Gaston (edited October 12, 2003).]
Leave a comment:
-
Guest repliedI guess that Mark has not generated all the interfaces. You have to
"Select all the interfaces" with Ctrl+A or the menu.
------------------
Leave a comment:
-
Mark & Mark
I really only tested on a Windows 2000 Pro notebook with virtually
every Microsoft development tool loaded. It's possible that I have
multiple libraries that some people may not have.
However, illegal function call can have several different meanings.
I would recommend that you trap the error and go for the more descriptive
error message offered in the user's guide and shown in the sample:
Code:CALL FormatMessage(%FORMAT_MESSAGE_FROM_SYSTEM, _ BYVAL 0&, OBJRESULT, BYVAL MAKELANGID( _ %LANG_NEUTRAL, %SUBLANG_DEFAULT), _ A, SIZEOF(A), BYVAL 0&) MSGBOX A
a variant, feel free to email it to me and I'll see if I can help
or post it here.
You are also welcome to try a compiled exe which is using CDO
and grab the source code (written for VD - Visual Designer for PB).
This will help you know if you have everything installed to utilize
CDO this way.
http://www.zcureit.com/vd/CDOMailer.zip
-Ken
In case everyone is not aware, VD for PB is available at:
http://www.hellobasic.com
kmyers at zcureit dot com
------------------
[This message has been edited by Ken Myers (edited October 09, 2003).]
Leave a comment:
-
Guest repliedDIM myMail AS CDONTSNewMail
I get undefined type using Windows XP Pro.
------------------
Leave a comment:
-
This could indicate to me that the use of PB's COM browser to generate and use code
from COM objects, without having first obtained a licence from the COM Object developer,
might be an infringement of copyright.
in question. You may need a developer's license in order to use an
object with your program, for example. It's a pity that Microsoft
didn't supply a "license" field next to the "copyright" field. As it
stands, finding the license information may be rather a chore. Check
with the copyright owner.
------------------
Tom Hanlin
PowerBASIC Staff
Leave a comment:
-
Hey Joe,
I was unable to get your example to work. I generated the CDO.inc file as per your directions but the example bails out on this line...
Code:object call myMail.Send to vVnt
Thanks for any help
------------------
Stay where ya from, we'll come where ya to.
Leave a comment:
-
Sorry about that everyone.
PB Admin. thanks for the correction. I remember that this issue
has been brought up before.
-Ken
------------------
Leave a comment:
-
Re the CDO.INC removed post and :-
' Legal Copyright: Copyright (C) 1986-1999 Microsoft Corp. All rights reserved.
Removed by Administrator. Please don't post copyrighted code unless you can show
that it may legally be distributed in public.'
This could indicate to me that the use of PB's COM browser to generate and use code
from COM objects, without having first obtained a licence from the COM Object developer,
might be an infringement of copyright.
How do we stand on this?
I still intend to try a generation of CDO.INC at home tonight, as described by Ken.
Regards
David
------------------
Leave a comment:
-
Other good reasons to use CDO:
1) It avoids the prompt that comes up saying "An application is
trying to send an email..." that makes MAPI unusable in some environments.
2) It allows for images to be embedded easily into your HTML email. You
can check out the use of AttachURL.
3) It's much easier than directly dealing with extended MAPI.
Here is a link to Microsoft info on CDO which covers the system requirements:
http://msdn.microsoft.com/library/de...ataobjects.asp
-Ken
------------------
Leave a comment:
-
joe,
sorry about that. it really wasn't that long so i went ahead and
added it to the post in the source code forum.
http://www.powerbasic.com/support/pb...ad.php?t=24026
to create the include file you can do the following in pbwin 7.0x
or pbcc 3.0x:
1) go to the tools menu and select powerbasic com browser.
2) file/open a registered library.
3) scroll through the list of registered libraries looking for "microsoft cdo for nts 1.2 library".
4) select that and its interface will show in pb's com browser.
5) i then performed a file/select all interfaces and a file/save interface to clipboard.
6) i then created a new file in the powerbasic editor and pasted the interface code into the editor.
7) i then named the file cdo.inc and included it in the main module as usual.
i have found this to be extremely powerful and am very grateful to powerbasic for incorporating
this functionality into pbwin7 and pbcc3.
hope this helps.
-ken
------------------
Leave a comment:
-
HTML Email from Source Code forum
Ken,
'CDO.INC is not included, just prepare your own from
'the PB COM Browser
Thanks. It looks like pretty cool code that I'm sure many (including me!) will get lots of use out of!
------------------
Joe Byrne
mailto:[email protected]
[email protected]
</A>Tags: None
Leave a comment: