If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Holy Cow I think I found the problem and it was me!
This code also worked in my environment, so I had no reason to investigate it any further. Turns out that all of the namespaces in the CDOSYS configuration object are case sensitive. Sheesh!!! So you want to make ALL of those items ALL LOWER CASE. When I originally coded it I made it all Camel Case to make it easier to read. MY FAULT! So... You need to change http://Schemas.microsoft.com/cdo/configuration/ To http://schemas.microsoft.com/cdo/configuration/ and ..Item(strSch & "SMTPAuthenticate") to .Item(strSch & "smtpauthenticate") and ..Item(strSch & "SendUserName") to .Item(strSch & "sendusername") and ..Item(strSch & "SendPassword") to .Item(strSch & "sendpassword") Really sorry about the bad code:-( Ron W "Brad Pears" wrote in message ... ROn, adding in the authentication works plawlessly on my XP machine now... However, on the Win2K and Win2K3 servers I get the following error on the .send line "The SMTP server name is required and was not found in the configuration source" I've tried replacing true3 with the IP address, full name (incl.com etc..) all to no avail. very strange... Any idea there? "Ron Weiner" wrote in message ... Brad If your SMTP server name is true3 and that name resolves to a valid IP address of a SMTP server (from your development box), and there are no firewalls that block traffic on Port 25, then I can not see any reason that this won't work. What the error message seems to be saying is "I can't start a communication session with your SMTP server". The first thing I'd check would be to make sure the server accepts anonymous connections (in today's world there are VERY few that will), or un-rem and fill out the Authenticate, Username, and Password code. The next thing I'd try is replacing the DNS name "true3" with the IP address of the server. After that I am out of Idea's Perhaps someone on the Exchange side could shed additional light on this. Ron W "Brad Pears" wrote in message ... Ron, I used the code below (basically your code except I entered our smtp server name (Exchange 2000), email names etc... but on the .send I get the following error... "The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available." I am running this on my XP machine... Any ideas? Code... Private Sub Command1_Click() Const cdoSendUsingPort = 2 Const cdoBasic = 1 Dim objCDOConfig As Object, objCDOMessage As Object Dim strSch As String strSch = "http://Schemas.microsoft.com/cdo/configuration/" Set objCDOConfig = CreateObject("CDO.Configuration") With objCDOConfig.Fields .Item(strSch & "sendusing") = cdoSendUsingPort .Item(strSch & "smtpserver") = "true3" 'Only used if SMTP server requires Authentication '.Item(strSch & "SMTPAuthenticate") = cdoBasic '.Item(strSch & "SendUserName") = " '.Item(strSch & "SendPassword") = "APassword" .Update End With Set objCDOMessage = CreateObject("CDO.Message") With objCDOMessage Set .Configuration = objCDOConfig .From = "Brad Pears" .Sender = " .To = " .Subject = "Sample CDO Message" '.TextBody = "This is a test for CDO.message" .HTMLBody = "This is not Bold But BThis is!/B" .Send End With Set objCDOMessage = Nothing Set objCDOConfig = Nothing End Sub "Ron Weiner" wrote in message ... See: http://msdn.microsoft.com/library/de...figuration.asp Ron W "Brad Pears" wrote in message ... Thanks for that Ron - I'll give it a shot... Can you exxplain the http search string for me? Why is that required? and how does it work? Also, should I be able to actually go to that website (http://Schemas.microsoft.com/cdo/configuration/" ... because I can't... Thanks, Brad "Ron Weiner" wrote in message ... Looks Like you are NOT setting the CDOMessage.Configuration. Here is Some Code that might help you. Const cdoSendUsingPort = 2 Const cdoBasic = 1 Dim objCDOConfig As Object, objCDOMessage As Object Dim strSch As String strSch = "http://Schemas.microsoft.com/cdo/configuration/" Set objCDOConfig = CreateObject("CDO.Configuration") With objCDOConfig.Fields .Item(strSch & "sendusing") = cdoSendUsingPort .Item(strSch & "smtpserver") = "SMTPServer.SomeDomain.COM" 'Only used if SMTP server requires Authentication '.Item(strSch & "SMTPAuthenticate") = cdoBasic '.Item(strSch & "SendUserName") = " '.Item(strSch & "SendPassword") = "APassword" .Update End With Set objCDOMessage = CreateObject("CDO.Message") With objCDOMessage Set .Configuration = objCDOConfig .From = "Ron" .Sender = " .To = " .Subject = "Sample CDO Message" '.TextBody = "This is a test for CDO.message" .HTMLBody = "This is not Bold But BThis is!/B" .Send End With Set objCDOMessage = Nothing Set objCDOConfig = Nothing Ron W "Brad Pears" wrote in message ... I have the following code in an Access 2000 project which sends an from my app. It works perfectly on my XP machine, runs but does not send any mail on our Win2K term server, and crashes on our Win2K3 server... Here is the code... 'Sending a text email Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Example CDO Message" objMessage.Sender = " objMessage.To = " objMessage.TextBody = "This is some sample message text." objMessage.Send On my XP machineit works flawlessly... On the WIn2K term server, the code executes but no email is generated... On the Win2K3 server, the code crashes on the .send line with the following error... "The SendUsing" configuration value is invalid" Does anyone have any ideas why I am seeing three different results on three different OS's with this code? I thought CDO was used on Win2K and up... Thanks, Brad |
#12
|
|||
|
|||
Hi!
I've had the same problem for months, and posted on various groups without any working solutions; but this helped me - Thank You! However, my application is running in different countries with different servers, and the users don't know which server they are using, and it may change so I don't want to have them configure it. Is there some way I can find out using VBA the SMTP server used in Outlook and use that? Or some other way that means I don't have to specify it? Brgds Danny "Ron Weiner" wrote: Looks Like you are NOT setting the CDOMessage.Configuration. Here is Some Code that might help you. Const cdoSendUsingPort = 2 Const cdoBasic = 1 Dim objCDOConfig As Object, objCDOMessage As Object Dim strSch As String strSch = "http://Schemas.microsoft.com/cdo/configuration/" Set objCDOConfig = CreateObject("CDO.Configuration") With objCDOConfig.Fields .Item(strSch & "sendusing") = cdoSendUsingPort .Item(strSch & "smtpserver") = "SMTPServer.SomeDomain.COM" 'Only used if SMTP server requires Authentication '.Item(strSch & "SMTPAuthenticate") = cdoBasic '.Item(strSch & "SendUserName") = " '.Item(strSch & "SendPassword") = "APassword" .Update End With Set objCDOMessage = CreateObject("CDO.Message") With objCDOMessage Set .Configuration = objCDOConfig .From = "Ron" .Sender = " .To = " .Subject = "Sample CDO Message" '.TextBody = "This is a test for CDO.message" .HTMLBody = "This is not Bold But BThis is!/B" .Send End With Set objCDOMessage = Nothing Set objCDOConfig = Nothing Ron W "Brad Pears" wrote in message ... I have the following code in an Access 2000 project which sends an email from my app. It works perfectly on my XP machine, runs but does not send any mail on our Win2K term server, and crashes on our Win2K3 server... Here is the code... 'Sending a text email Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Example CDO Message" objMessage.Sender = " objMessage.To = " objMessage.TextBody = "This is some sample message text." objMessage.Send On my XP machineit works flawlessly... On the WIn2K term server, the code executes but no email is generated... On the Win2K3 server, the code crashes on the .send line with the following error... "The SendUsing" configuration value is invalid" Does anyone have any ideas why I am seeing three different results on three different OS's with this code? I thought CDO was used on Win2K and up... Thanks, Brad |
#13
|
|||
|
|||
I don't know if this helps, but take a look at www.rondebruin.nl
He may have an answer for you. Maybe he knows a way around this problem. Rody "Danny" schreef in bericht ... Hi! I've had the same problem for months, and posted on various groups without any working solutions; but this helped me - Thank You! However, my application is running in different countries with different servers, and the users don't know which server they are using, and it may change so I don't want to have them configure it. Is there some way I can find out using VBA the SMTP server used in Outlook and use that? Or some other way that means I don't have to specify it? Brgds Danny "Ron Weiner" wrote: Looks Like you are NOT setting the CDOMessage.Configuration. Here is Some Code that might help you. Const cdoSendUsingPort = 2 Const cdoBasic = 1 Dim objCDOConfig As Object, objCDOMessage As Object Dim strSch As String strSch = "http://Schemas.microsoft.com/cdo/configuration/" Set objCDOConfig = CreateObject("CDO.Configuration") With objCDOConfig.Fields .Item(strSch & "sendusing") = cdoSendUsingPort .Item(strSch & "smtpserver") = "SMTPServer.SomeDomain.COM" 'Only used if SMTP server requires Authentication '.Item(strSch & "SMTPAuthenticate") = cdoBasic '.Item(strSch & "SendUserName") = " '.Item(strSch & "SendPassword") = "APassword" .Update End With Set objCDOMessage = CreateObject("CDO.Message") With objCDOMessage Set .Configuration = objCDOConfig .From = "Ron" .Sender = " .To = " .Subject = "Sample CDO Message" '.TextBody = "This is a test for CDO.message" .HTMLBody = "This is not Bold But BThis is!/B" .Send End With Set objCDOMessage = Nothing Set objCDOConfig = Nothing Ron W "Brad Pears" wrote in message ... I have the following code in an Access 2000 project which sends an from my app. It works perfectly on my XP machine, runs but does not send any mail on our Win2K term server, and crashes on our Win2K3 server... Here is the code... 'Sending a text email Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Example CDO Message" objMessage.Sender = " objMessage.To = " objMessage.TextBody = "This is some sample message text." objMessage.Send On my XP machineit works flawlessly... On the WIn2K term server, the code executes but no email is generated... On the Win2K3 server, the code crashes on the .send line with the following error... "The SendUsing" configuration value is invalid" Does anyone have any ideas why I am seeing three different results on three different OS's with this code? I thought CDO was used on Win2K and up... Thanks, Brad |
#14
|
|||
|
|||
Hi!
Unfortunately that site only repeated the same problem that I had; you have to specify SMTP server in order to use CDO. However, there was a link on the site to http://vbnet.mvps.org/, which DID have all the information I needed! So thank you. Brgds Danny "Rody" wrote: I don't know if this helps, but take a look at www.rondebruin.nl He may have an answer for you. Maybe he knows a way around this problem. Rody "Danny" schreef in bericht ... Hi! I've had the same problem for months, and posted on various groups without any working solutions; but this helped me - Thank You! However, my application is running in different countries with different servers, and the users don't know which server they are using, and it may change so I don't want to have them configure it. Is there some way I can find out using VBA the SMTP server used in Outlook and use that? Or some other way that means I don't have to specify it? Brgds Danny "Ron Weiner" wrote: Looks Like you are NOT setting the CDOMessage.Configuration. Here is Some Code that might help you. Const cdoSendUsingPort = 2 Const cdoBasic = 1 Dim objCDOConfig As Object, objCDOMessage As Object Dim strSch As String strSch = "http://Schemas.microsoft.com/cdo/configuration/" Set objCDOConfig = CreateObject("CDO.Configuration") With objCDOConfig.Fields .Item(strSch & "sendusing") = cdoSendUsingPort .Item(strSch & "smtpserver") = "SMTPServer.SomeDomain.COM" 'Only used if SMTP server requires Authentication '.Item(strSch & "SMTPAuthenticate") = cdoBasic '.Item(strSch & "SendUserName") = " '.Item(strSch & "SendPassword") = "APassword" .Update End With Set objCDOMessage = CreateObject("CDO.Message") With objCDOMessage Set .Configuration = objCDOConfig .From = "Ron" .Sender = " .To = " .Subject = "Sample CDO Message" '.TextBody = "This is a test for CDO.message" .HTMLBody = "This is not Bold But BThis is!/B" .Send End With Set objCDOMessage = Nothing Set objCDOConfig = Nothing Ron W "Brad Pears" wrote in message ... I have the following code in an Access 2000 project which sends an from my app. It works perfectly on my XP machine, runs but does not send any mail on our Win2K term server, and crashes on our Win2K3 server... Here is the code... 'Sending a text email Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Example CDO Message" objMessage.Sender = " objMessage.To = " objMessage.TextBody = "This is some sample message text." objMessage.Send On my XP machineit works flawlessly... On the WIn2K term server, the code executes but no email is generated... On the Win2K3 server, the code crashes on the .send line with the following error... "The SendUsing" configuration value is invalid" Does anyone have any ideas why I am seeing three different results on three different OS's with this code? I thought CDO was used on Win2K and up... Thanks, Brad |
#15
|
|||
|
|||
Isn't there a more simple way to send email? Like the SendObject command in
VBA? Ed "Danny" wrote in message ... Hi! Unfortunately that site only repeated the same problem that I had; you have to specify SMTP server in order to use CDO. However, there was a link on the site to http://vbnet.mvps.org/, which DID have all the information I needed! So thank you. Brgds Danny "Rody" wrote: I don't know if this helps, but take a look at www.rondebruin.nl He may have an answer for you. Maybe he knows a way around this problem. Rody "Danny" schreef in bericht ... Hi! I've had the same problem for months, and posted on various groups without any working solutions; but this helped me - Thank You! However, my application is running in different countries with different servers, and the users don't know which server they are using, and it may change so I don't want to have them configure it. Is there some way I can find out using VBA the SMTP server used in Outlook and use that? Or some other way that means I don't have to specify it? Brgds Danny "Ron Weiner" wrote: Looks Like you are NOT setting the CDOMessage.Configuration. Here is Some Code that might help you. Const cdoSendUsingPort = 2 Const cdoBasic = 1 Dim objCDOConfig As Object, objCDOMessage As Object Dim strSch As String strSch = "http://Schemas.microsoft.com/cdo/configuration/" Set objCDOConfig = CreateObject("CDO.Configuration") With objCDOConfig.Fields .Item(strSch & "sendusing") = cdoSendUsingPort .Item(strSch & "smtpserver") = "SMTPServer.SomeDomain.COM" 'Only used if SMTP server requires Authentication '.Item(strSch & "SMTPAuthenticate") = cdoBasic '.Item(strSch & "SendUserName") = " '.Item(strSch & "SendPassword") = "APassword" .Update End With Set objCDOMessage = CreateObject("CDO.Message") With objCDOMessage Set .Configuration = objCDOConfig .From = "Ron" .Sender = " .To = " .Subject = "Sample CDO Message" '.TextBody = "This is a test for CDO.message" .HTMLBody = "This is not Bold But BThis is!/B" .Send End With Set objCDOMessage = Nothing Set objCDOConfig = Nothing Ron W "Brad Pears" wrote in message ... I have the following code in an Access 2000 project which sends an from my app. It works perfectly on my XP machine, runs but does not send any mail on our Win2K term server, and crashes on our Win2K3 server... Here is the code... 'Sending a text email Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Example CDO Message" objMessage.Sender = " objMessage.To = " objMessage.TextBody = "This is some sample message text." objMessage.Send On my XP machineit works flawlessly... On the WIn2K term server, the code executes but no email is generated... On the Win2K3 server, the code crashes on the .send line with the following error... "The SendUsing" configuration value is invalid" Does anyone have any ideas why I am seeing three different results on three different OS's with this code? I thought CDO was used on Win2K and up... Thanks, Brad |
#16
|
|||
|
|||
Hi!
Indeed, SendObject is much easier and reliable. However, it uses Outlook, and since Outlook 2003 (I believe), it comes up with a dialog box saying that "someone is sending emails on your behalf", waits for 5 seconds, and then you have to click Yes to allow the mail to be sent. This application is usually run unattended over night, so that dialog box is unacceptable. Using CDO directly, you don't get that dialog box with the 5 second delay, so it can just send the mail and continue. (It sends error messages to the programmer, technical setup messages to support, progress messages to managers, and the produced reports to the users - of which there can be up to a couple of hundred) Brgds Danny "Edward" wrote: Isn't there a more simple way to send email? Like the SendObject command in VBA? Ed "Danny" wrote in message ... Hi! Unfortunately that site only repeated the same problem that I had; you have to specify SMTP server in order to use CDO. However, there was a link on the site to http://vbnet.mvps.org/, which DID have all the information I needed! So thank you. Brgds Danny "Rody" wrote: I don't know if this helps, but take a look at www.rondebruin.nl He may have an answer for you. Maybe he knows a way around this problem. Rody "Danny" schreef in bericht ... Hi! I've had the same problem for months, and posted on various groups without any working solutions; but this helped me - Thank You! However, my application is running in different countries with different servers, and the users don't know which server they are using, and it may change so I don't want to have them configure it. Is there some way I can find out using VBA the SMTP server used in Outlook and use that? Or some other way that means I don't have to specify it? Brgds Danny "Ron Weiner" wrote: Looks Like you are NOT setting the CDOMessage.Configuration. Here is Some Code that might help you. Const cdoSendUsingPort = 2 Const cdoBasic = 1 Dim objCDOConfig As Object, objCDOMessage As Object Dim strSch As String strSch = "http://Schemas.microsoft.com/cdo/configuration/" Set objCDOConfig = CreateObject("CDO.Configuration") With objCDOConfig.Fields .Item(strSch & "sendusing") = cdoSendUsingPort .Item(strSch & "smtpserver") = "SMTPServer.SomeDomain.COM" 'Only used if SMTP server requires Authentication '.Item(strSch & "SMTPAuthenticate") = cdoBasic '.Item(strSch & "SendUserName") = " '.Item(strSch & "SendPassword") = "APassword" .Update End With Set objCDOMessage = CreateObject("CDO.Message") With objCDOMessage Set .Configuration = objCDOConfig .From = "Ron" .Sender = " .To = " .Subject = "Sample CDO Message" '.TextBody = "This is a test for CDO.message" .HTMLBody = "This is not Bold But BThis is!/B" .Send End With Set objCDOMessage = Nothing Set objCDOConfig = Nothing Ron W "Brad Pears" wrote in message ... I have the following code in an Access 2000 project which sends an from my app. It works perfectly on my XP machine, runs but does not send any mail on our Win2K term server, and crashes on our Win2K3 server... Here is the code... 'Sending a text email Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Example CDO Message" objMessage.Sender = " objMessage.To = " objMessage.TextBody = "This is some sample message text." objMessage.Send On my XP machineit works flawlessly... On the WIn2K term server, the code executes but no email is generated... On the Win2K3 server, the code crashes on the .send line with the following error... "The SendUsing" configuration value is invalid" Does anyone have any ideas why I am seeing three different results on three different OS's with this code? I thought CDO was used on Win2K and up... Thanks, Brad |
#17
|
|||
|
|||
Hi Danny
I tend to disagree... We have Groupwise as our default email, and SendObject uses the default client, not necessarily Outlook/Express. In my case, Groupwise kicks in when the SendObject is called... just for reference... DubboPete "Danny" wrote in message ... Hi! Indeed, SendObject is much easier and reliable. However, it uses Outlook, and since Outlook 2003 (I believe), it comes up with a dialog box saying that "someone is sending emails on your behalf", waits for 5 seconds, and then you have to click Yes to allow the mail to be sent. |
#18
|
|||
|
|||
Where can I get more info on CDO?
This link is dead: http://schemas.microsoft.com/cdo/configuration/ I'd use the Sheellexecute but it won't send after filling the blanks... Anyone know how to force SEND using ShellExecute? "DubboPete" wrote in message ... Hi Danny I tend to disagree... We have Groupwise as our default email, and SendObject uses the default client, not necessarily Outlook/Express. In my case, Groupwise kicks in when the SendObject is called... just for reference... DubboPete "Danny" wrote in message ... Hi! Indeed, SendObject is much easier and reliable. However, it uses Outlook, and since Outlook 2003 (I believe), it comes up with a dialog box saying that "someone is sending emails on your behalf", waits for 5 seconds, and then you have to click Yes to allow the mail to be sent. |
#19
|
|||
|
|||
Indeed, since Outlook is our default client, SendObject uses Outlook as I said.
Brgds Danny "DubboPete" wrote: Hi Danny I tend to disagree... We have Groupwise as our default email, and SendObject uses the default client, not necessarily Outlook/Express. In my case, Groupwise kicks in when the SendObject is called... just for reference... DubboPete "Danny" wrote in message ... Hi! Indeed, SendObject is much easier and reliable. However, it uses Outlook, and since Outlook 2003 (I believe), it comes up with a dialog box saying that "someone is sending emails on your behalf", waits for 5 seconds, and then you have to click Yes to allow the mail to be sent. |
#20
|
|||
|
|||
Hi!
If you search for CDO.Message in any search engine you'll find hundreds of pages. One that I found good for code snippets was http://www.paulsadowski.com/WSH/cdo.htm. If you're after detailed nitty gritty about CDO itself then MSDN has for instance this page: http://msdn.microsoft.com/library/de...ndows_2000.asp. BTW, the schemas page isn't supposed to be opened in a browser (if that's what you mean by it being dead). I've never tried sending mails from shell, so I can't help you there. Brgds Danny "Rhonda" wrote: Where can I get more info on CDO? This link is dead: http://schemas.microsoft.com/cdo/configuration/ I'd use the Sheellexecute but it won't send after filling the blanks... Anyone know how to force SEND using ShellExecute? "DubboPete" wrote in message ... Hi Danny I tend to disagree... We have Groupwise as our default email, and SendObject uses the default client, not necessarily Outlook/Express. In my case, Groupwise kicks in when the SendObject is called... just for reference... DubboPete "Danny" wrote in message ... Hi! Indeed, SendObject is much easier and reliable. However, it uses Outlook, and since Outlook 2003 (I believe), it comes up with a dialog box saying that "someone is sending emails on your behalf", waits for 5 seconds, and then you have to click Yes to allow the mail to be sent. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cant send email through SMTP (post Office s003 SP1) | CJM | General Discussion | 14 | September 7th, 2004 02:46 PM |
Why, when I change accounts to send an email, does the appropriat. | EWM737 | General Discussion | 3 | August 29th, 2004 03:40 PM |
Send an Email from a form using that forms data | Brook | Using Forms | 0 | June 16th, 2004 04:07 AM |