An alternative method to send email, take a look at this free dll
free SMTP e-mail component: http://www.freevbcode.com/
Main Topics
Browse All TopicsHello everybody,
I have an application that composes an E-mail and displays the Send Dialog to a user before sending it away. I have used the CDO 1.2.1 reference. My code is straightforward and I don't do any tricks. While we had Windows 98 and the Exchange 5.5 client everything worked fine. Since we migrated to XP with Outlook 2000 I have a problem.
In XP you get an annoying message that "some program is trying to access... etc." so far so good. Users press Yes (allow) and the next pops up "a program is trying to send mail on your behalf... etc.". Users press OK on that one too and the dialog _should_ present itself for final inspection and sending.
That does not happen. Right after people press "Yes" on the second pop-up a runtime error "-2147417848 Method '~' of object '~' failed" occurs. I have no idea why.
So far I have looked at the MSDN and Technet for this error but I can't find anything related to either Outlook or the CDO library. Did somebody had a similar problem and if so, how did you solve it.
Following is my code excerpt from the routine giving the trouble:
Select Case True
Case optMethode(SM_EMAIL).Value
Set oSession = New MAPI.Session
oSession.Logon NewSession:=False
Set oMessage = oSession.Outbox.Messages.A
oMessage.Subject = "Klachtmelding"
oMessage.Text = sTextToSend
Set oRecipient = oMessage.Recipients.Add
oRecipient.Type = CdoTo
oRecipient.Address = "SMTP:" & m_rsContactpersonen.Fields
oRecipient.Resolve ShowDialog:=False
oMessage.Update
oMessage.Send True, True, 0
Set oRecipient = Nothing
Set oMessage = Nothing
oSession.Logoff
Set oSession = Nothing
A footnote on the code above, the assumption that every variable is a local variable is correct, except for the m_rs. That's a module level ADO recordset.
Thanks very much in advance for any time spend on this question.
Grtz.©
D.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
An alternative method to send email, take a look at this free dll
free SMTP e-mail component: http://www.freevbcode.com/
Hi,
If security is causing the problem of the runtime error returned to my application, I would expect a different error number. I will look into the security page you gave. I will need some time to validate this, rather complex and this has a few big implications. I will need to talk to our system administrator about the impact on overall security.
I can't use a SMTP E-mail component because one of the requirements is that any E-mail sent from the application must be archived in the "Sent Items" folder (unreliable handling of the E-mail by the recieving party is rule rather then exception). The fact that the object model is locked down isn't the real problem though, it's the error message that follows.
I will let you know how and what.
Grtz.©
D.
This is a confirmed bug in MS Office, but more common in Excel. However, it can occur using ADO as well, as in: http://support.microsoft.c
I'm not sure it helps a lot, but it can give you a start where to look.
S
Hi,
I'm sorry I didn't respond to this question, but we had a severe problem with (how ironic) the E-mail server. (see question http://www.experts-exchang
As I said before, I had to discus the matter with out network admin. Since the mailcrash he's been very protective to the mailserver. He's hovering above it with a very big gatling gun and shoots everybody that approaches it. So I can't fiddle with security settings yet and test things out.
If the situation improves, I will let you know. In the meantime I will keep this question open.
Grtz.©
D.
Business Accounts
Answer for Membership
by: DhaestPosted on 2004-06-16 at 05:05:19ID: 11323448
Security is causing that problem utlook/ese cup.htm#au tosec
Take a look at http://www.slipstick.com/o
Here you find all the possible solutions, advantages & disadvantages of them.