Error while sending mail

3 views
Skip to first unread message

Kiran Raj

unread,
Nov 24, 2009, 8:43:29 AM11/24/09
to DotNetDe...@googlegroups.com
Hi all,

I am receiving  the following exception when i try to send a mail from a console app in the production machine. the same app seems to work on my dev machine.
i tried google and found some suggestions. they say , this problem is because of permission, code issue, SMTP server name but all seem to be fine as i verified them. I am using System.Web.Mail namespace instead of System.Net.Mail. Posts also say to use the later but as i am working in dotnet 1.1. I cant use System.Net.Mail.
Can anyone help me on this.

Referred Links:

http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_frm/thread/f2ef95e6fb1e0112?hl=en&lr&ie=UTF-8&oe=UTF8&newwindow=1&rnum=75&prev=%2Fgroups%3Fq%3Dcdo.message%2Bgroup%3Amicrosoft.public.dotnet.*%26num%3D50%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF8%26newwindow%253&pli=1

http://www.systemwebmail.com/faq/4.2.3.aspx

http://forums.asp.net/p/1212374/2144202.aspx#2144202

---------------------------------------------------------------------------------------------------------------
System.Web.HttpException: Unable to access the object 'CDO.Message'. --
-> System.Reflection.TargetInvocationException: Exception has been thrown in the
stino of invocation. ---> System.Runtime.InteropServices.COMException (0x8004
0220): Invalid configuration value "SendUsing.

   
--- End of stack trace --- inner exception
   
at System.RuntimeType.InvokeDispMethod (String name, BindingFlags invokeAttr,
Object target, Object [] args, Boolean [] byrefModifiers, Int32 culture, String []
namedParameters)
   
at System.RuntimeType.InvokeMember (String name, BindingFlags invokeAttr, Bind
er binder, Object target, Object [] args, ParameterModifier [] modifiers, CultureI
nfo culture, String [] namedParameters)
   
at System.Web.Mail.LateBoundAccessHelper.CallMethod (Object obj, String method
Name, Object [] args)
   
--- End of stack trace --- inner exception
   
at System.Web.Mail.LateBoundAccessHelper.CallMethod (Object obj, String method
Name, Object [] args)
   
at System.Web.Mail.CdoSysHelper.Send (MailMessage message)
   
at System.Web.Mail.SmtpMail.Send (MailMessage message)
   
at MailTest.Class1.SendEmail ()
-------------------------------------------------------------------------------------------------------------------------

thanks
kiran

Processor Devil

unread,
Nov 25, 2009, 3:12:31 AM11/25/09
to dotnetde...@googlegroups.com
Does your SMTP server need some user authorization?

2009/11/24 Kiran Raj <23k...@gmail.com>

Kiran Raj

unread,
Nov 25, 2009, 4:06:15 AM11/25/09
to dotnetde...@googlegroups.com
No its does not require any authorization. I can connect and send mails without any from my system.
 Will OS be a constraint as i am working in XP SP2 and mail sending is working but server is windows 2003 R2.

Processor Devil

unread,
Nov 25, 2009, 5:58:15 AM11/25/09
to dotnetde...@googlegroups.com
well, does your code look like example on
http://msdn.microsoft.com/en-us/library/system.web.mail.mailmessage.aspx
???

2009/11/25 Kiran Raj <23k...@gmail.com>

Processor Devil

unread,
Nov 25, 2009, 6:02:41 AM11/25/09
to dotnetde...@googlegroups.com
I would also recommend you to check this site
http://www.codersource.net/csharp_sending_emails.aspx

2009/11/25 Processor Devil <process...@gmail.com>

Kiran Raj

unread,
Nov 25, 2009, 8:20:31 AM11/25/09
to dotnetde...@googlegroups.com
Yes my code is similar. same library and i have used SmtpMail.SmtpServer. Actually i was working on a windows service which sends mail, when that didnt work i used a sample app with the code similar to the link below.
Reply all
Reply to author
Forward
0 new messages