|
-
Feb 28th, 2009, 10:42 PM
#1
Thread Starter
PowerPoster
cdosys.dll xp and vista different?
I am having trouble sending emails when installing my app on vista. The cdosys.dll on xp is 2043kb ver 6.2.4 and vista is 787kb ver 6.6.6001. Does anyone know why ?
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Mar 1st, 2009, 12:11 AM
#2
Re: cdosys.dll xp and vista different?
Are you early binding? I believe you are... I could be wrong 
Try late binding...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Mar 1st, 2009, 12:28 AM
#3
Thread Starter
PowerPoster
Re: cdosys.dll xp and vista different?
 Originally Posted by koolsid
Are you early binding? I believe you are... I could be wrong
Try late binding...
I am doing it like this:
Make reference then:
Dim objMessage
Set objMessage = CreateObject("CDO.Message")
Is this early ? How do you do late binding ?
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Mar 1st, 2009, 12:34 AM
#4
Re: cdosys.dll xp and vista different?
What do you mean by this...
CreateObject("CDO.Message")
This is late binding...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Mar 1st, 2009, 12:45 AM
#5
Thread Starter
PowerPoster
Re: cdosys.dll xp and vista different?
 Originally Posted by koolsid
What do you mean by this...
This is late binding...
Make a reference
Project>References>Microsoft CDO For Windows 2000 library. Do you have vista ? I think the problem is the size and version. I have not tried replacing the dll with xp's yet
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Mar 1st, 2009, 12:49 AM
#6
Re: cdosys.dll xp and vista different?
Make a reference
Project>References>Microsoft CDO For Windows 2000 library.
Umm, I thought so... This is early binding
You are mixing Early and Late together...
Remove that reference and try again... If it still doesn't work, then can I see the begining of the code where you are trying to connect...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Mar 1st, 2009, 01:00 AM
#7
Thread Starter
PowerPoster
Re: cdosys.dll xp and vista different?
 Originally Posted by koolsid
Umm, I thought so... This is early binding
You are mixing Early and Late together...
Remove that reference and try again... If it still doesn't work, then can I see the begining of the code where you are trying to connect...
Dim objMessage
Code:
Set objMessage = CreateObject("CDO.Message")
objMessage.Organization = "Frank zebra construction"
objMessage.From = Me.txtUserName ' "[email protected]"
objMessage.To = txtTo
objMessage.cc = txtCc
objMessage.BCC = Me.txtBcc
objMessage.ReplyTo = Me.txtFromEmail
objMessage.Subject = Me.txtSubject
objMessage.TextBody = Me.txtMsg
objMessage.AddAttachment txtAttach 'path to attachment
objMessage.Send
Set objMessage = Nothing
MsgBox "Mail sent"
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Mar 1st, 2009, 01:02 AM
#8
Re: cdosys.dll xp and vista different?
Ok, I'll come to the above code in a moment... Did you try what I said in the previous post?
Remove that reference and try again... If it still doesn't work
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Mar 1st, 2009, 01:15 AM
#9
Thread Starter
PowerPoster
Re: cdosys.dll xp and vista different?
 Originally Posted by koolsid
Ok, I'll come to the above code in a moment... Did you try what I said in the previous post?
I will try it pretty soon. Not that easy as i am developing on xp flash drive then vista. Read an article where app made on vista sometimes will have problems on xp
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Mar 1st, 2009, 01:20 AM
#10
Re: cdosys.dll xp and vista different?
Ok post back when you do that... we will take it from there 
Edit: I am sorry... Seems I misread the code... it's latebinding... Just remove the reference and then run the program in vista...
Last edited by Siddharth Rout; Mar 1st, 2009 at 02:52 AM.
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Mar 1st, 2009, 03:08 AM
#11
Thread Starter
PowerPoster
Re: cdosys.dll xp and vista different?
 Originally Posted by koolsid
Ok post back when you do that... we will take it from there
Edit: I am sorry... Seems I misread the code... it's latebinding... Just remove the reference and then run the program in vista...
I get an error on vista "The send configuration is invalid", just like before.
I removed the reference in xp and it still sent the email, but not xp
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Mar 1st, 2009, 03:17 AM
#12
Re: cdosys.dll xp and vista different?
I believe you need to add this as well... let me try it in vista...
Set objCDOConfig = CreateObject("CDO.Configuration")
I am in XP now and am downloading something... Will take another 1/2 before i can reboot into vista...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Mar 1st, 2009, 04:20 AM
#13
Re: cdosys.dll xp and vista different?
I get an error on vista "The send configuration is invalid", just like before.
this is i am sure a security issue in vista, you will need to set configuration options in cdo, as koolsid says you do not need any reference to any components when you use createobject, to create an instance object
but it looks like this is the same as http://www.vbforums.com/showthread.p...vista+security
google produced many results, here the first one with some test code and explanation
http://weblogs.asp.net/steveschofiel...5-and-587.aspx
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Mar 1st, 2009, 12:46 PM
#14
Re: cdosys.dll xp and vista different?
This certainly looks like it may be problematic for you.
Here is what I know
CDO for Windows, also known as CDO 2.0 or CDOSYS is not "different" in Vista from the one in XP except for the compiled version. This entirely different from COM interface versioning, which stays the same.
What this means: You can use early or late binding, it makes no difference. The newer CDOSYS.DLL did not break binary compatibility with previous versions.
The way you are using CDO in your code relies on the default configuration. This default normally uses the Outlook Express (OE) default email account's settings for the currently loaded user profile.
However: If the machine has the IIS SMTP service installed, the installation process causes CDO's default to be to use the local SMTP service's outgoing drop directory instead of sending to a remote server via SMTP.
This means the way you are using CDO will only ever work (even on XP or Win2K) if the user doesn't install IIS, since I believe the default IIS install on those OSs installs the SMTP service too. Furthermore, the user your program runs under must have a valid SMTP/POP3 default account set up in OE, or possibly some 3rd party email clients that are CDO-compatible.
Vista does not have this IIS SMTP service at all, even if IIS is installed.
Other things I suspect
Vista has no OE. Instead there is "Windows Mail."
Is this just OE, renamed? Is it still CDO-compatible? I'm not sure of either. However Windows 7 has no Outlook Express or Windows Mail at all!
Furthermore, many anti-virus suites may now interfere with CDO-originated email. It looks like some of them "hook" (intercept) any outbound connections on TCP port 25! You might get away with disabling outbound email scanning in them though. How will you do this for your users???
My test results
I tried a test using a CDO.Configuration object instead of letting a CDO.Message default. I set everything up for SMTP port 25 to my ISP's email server with a valid account/password in a way i have used in the past with no trouble.
Under Vista with AVG Free installed I get a "transport error" no matter what I try, i.e. even with outbound email scanning turned off in AVG.
Under Windows 7 with no anti-virus I am getting "SendUsing config" errors I can't seem to resolve.
Both of these setups "should" work, even with no default email profile set up because I'm not relying on a default configuration. The same program fails two different ways. I suspect:
- AVG is interfering on Vista.
- Something else is needed to set CDO up properly for Windows 7.
I may have to try rebooting on the Vista/AVG machine first, to make sure AVG is not trying to proxy my outbound email. I'm not sure where to begin with Windows 7. My guess is that with no OE or similar on Windows 7, CDO requires something that is missing.
Your Vista setup there might be missing the same "something."
-
Mar 1st, 2009, 01:53 PM
#15
Thread Starter
PowerPoster
Re: cdosys.dll xp and vista different?
I replaced the different cdosys.dll with the one from xp with no change, same error. I switched from vbsendmail to cdo, about a year ago because users were have to much difficulty with all the options in vbsendmail. My software is roof estimating and the users are not computer wizes. With the problem with vista and probably more in windows 7 it looks like i might to switch to something else, maybe a 3rd party ocx or ? This has sure become a major unexpected hurdle with making my app work on vista. Emailing rtf attachments (Contracts, Invoices, Purchase Orders, etc) is a nice feature with my app and I cannot abandon it. I sure do appreciate all the feedback and help.
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Mar 1st, 2009, 02:10 PM
#16
Re: cdosys.dll xp and vista different?
I feel your pain, believe me. But just doing some testing leads me to conclude that this can never be reliable for a machine you cannot administer. It isn't just a Vista issue, XP can be just as problematic.
The user might have AV or firewall software that will end up blocking any attempt to send SMTP email. The user may have IIS/SMTP installed so your use of the default config would fail. The user might not use Outlook Express/Windows Mail at all, so the default config would fail (maybe they use Outlook/Exchange, maybe web based email, etc.). The list goes on (and on).
All of this comes from the arms race between malware creators that turn users' machines into "spam zombies" and the email client, anti-virus, and firewall vendors as well as the ISP community, email server vendors, and server administrators to combat this plague.
If you just needed to have your program send "phone home" emails (crash reports, etc.) there might be other answers that aren't too awful. I suspect that you are sending emails that go out to your clients' customers though. This is a bit trickier.
The solution in both cases would require that you have a server on the public Internet of your own. That server would accept "email" requests using some alternative to SMTP (example: a SOAP web service or even a simpler HTTP POST), validate them, then format and relay as SMTP emails to the real destination. This would be a kind of email relay not based on SMTP (which is what everything is trying to protect users from).
Not an ideal solution.
-
Mar 1st, 2009, 02:42 PM
#17
Re: cdosys.dll xp and vista different?
Another thing to consider: How much software do you use that spawns emails anymore? Probably none.
There is a reason for this.
-
Mar 1st, 2009, 02:50 PM
#18
Thread Starter
PowerPoster
Re: cdosys.dll xp and vista different?
 Originally Posted by dilettante
I feel your pain, believe me. But just doing some testing leads me to conclude that this can never be reliable for a machine you cannot administer. It isn't just a Vista issue, XP can be just as problematic.
The user might have AV or firewall software that will end up blocking any attempt to send SMTP email. The user may have IIS/SMTP installed so your use of the default config would fail. The user might not use Outlook Express/Windows Mail at all, so the default config would fail (maybe they use Outlook/Exchange, maybe web based email, etc.). The list goes on (and on).
All of this comes from the arms race between malware creators that turn users' machines into " spam zombies" and the email client, anti-virus, and firewall vendors as well as the ISP community, email server vendors, and server administrators to combat this plague.
If you just needed to have your program send "phone home" emails (crash reports, etc.) there might be other answers that aren't too awful. I suspect that you are sending emails that go out to your clients' customers though. This is a bit trickier.
The solution in both cases would require that you have a server on the public Internet of your own. That server would accept "email" requests using some alternative to SMTP (example: a SOAP web service or even a simpler HTTP POST), validate them, then format and relay as SMTP emails to the real destination. This would be a kind of email relay not based on SMTP (which is what everything is trying to protect users from).
Not an ideal solution.
I have decided to drop cdo and go another route.
This has put me in a bind. I am a retired roofing contractor and my coding knowledge is really limited. I paid a renta coder last year to set up this:
Users can email me with ideas thru my online Jmail on my website, also silently emails me if any errors giving the module, error number, error description, line #, procedure name, OS, etc and this still works on Vista. This only gets sent to me with no attachments so I don't know if it could be reconfigured to send to other people with attachments. I always warn people that a possible failure could be a firewall. Right now i am looking at a ocx (Not free) that may do what I need: http://www.emailarchitect.net/webapp/smtpcom/. At this point I am investigating on which way to go. Have learned that before buying anything investigate. The 1st thing i usually check is their email response time. Thanks for your feedback on this
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Mar 1st, 2009, 02:52 PM
#19
Thread Starter
PowerPoster
Re: cdosys.dll xp and vista different?
 Originally Posted by dilettante
Another thing to consider: How much software do you use that spawns emails anymore? Probably none.
There is a reason for this.
What do you mean by spawns ?
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Mar 1st, 2009, 03:29 PM
#20
Re: cdosys.dll xp and vista different?
 Originally Posted by isnoend07
What do you mean by spawns ?
Any program besides an explicit email client that sends SMTP email, basically. It just isn't considered practical anymore.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|