peterdoherty Posted March 25, 2003 Posted March 25, 2003 Hi there, I am having problems sending mail using SMTPMail. The problem is as follows: I get an error message statingSystem.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid. on the SMTP.Send(messageObject) the code is as follows: Public Function SendMailviaSMTP(ByVal sTo As String, ByVal sCC As String, ByVal sBCC As String, _ ByVal sSubject As String, ByVal sFrom As String, ByVal sBody As String _ ) As Boolean Dim oMessage As New MailMessage() On Error GoTo err_handler oMessage.To = sTo oMessage.Cc = sCC oMessage.Bcc = sBCC oMessage.From = sFrom oMessage.Subject = sSubject oMessage.Body = sBody SmtpMail.Send(oMessage) Exit Function err_handler: 'error sending WriteToEventLog("Error Sending Mail") End Function This returns the above erro message. I have trind to set the server using SmtpMail.SmtpServer = "localhost" just before the smtpmail.send and this the same error message. I have tried to set the server to "laptop" which is the name of my machine and the same error occurs. Attached is the error page that is shown on the error. Any ideas? Thanks Peter Quote
Cassio Posted March 25, 2003 Posted March 25, 2003 Try this, comment the SmtpMail.SmtpServer = "localhost" line and it will use the local host as default. I had this problem and could only solve it this way. Quote Stream of Consciousness (My blog)
peterdoherty Posted March 25, 2003 Author Posted March 25, 2003 I have tried this and still the same error! Any ideas? Cheers Quote
wyrd Posted March 25, 2003 Posted March 25, 2003 It looks right to me. Could the server you're using not be configured properly for sending mail via ASP.NET? Quote Gamer extraordinaire. Programmer wannabe.
peterdoherty Posted March 26, 2003 Author Posted March 26, 2003 how could I check this? I have a SMTO virtual server in IIS. Quote
dvdaniels Posted September 1, 2003 Posted September 1, 2003 I am copying my finds I posted elsewhere. I think I know what is going on. You need to download the latest exchange servicepack and replace the cdoex.dll in the C:\Program Files\Common Files\Microsoft Shared\CDO directory. I had version 6.0.4641.0 and it would not work and gave me the same message that it gave you. I Downloaded the service pack 3 for exchange and extracted it. It will not let you install it unless you have Exchange Server 2000 so you have to grab the file manually. Once you are at that point, the dll is going to be in use so you will have to shut down to safe mode. Replace the file and reboot. The new version of the file should be 6.0.6249.1 then it should work or at least mine did after I did that. I hope that helps someone out there who is having this problem. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.