Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted
It looks right to me. Could the server you're using not be configured properly for sending mail via ASP.NET?
Gamer extraordinaire. Programmer wannabe.
  • 5 months later...
Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...