Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Debugging / May 2005

Tip: Looking for answers? Try searching our database.

Could not access 'CDO.Message' object.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason - 17 May 2005 16:23 GMT
Hi,

MailMessage mailMsg = new MailMessage();

mailMsg .From = "From";

mailMsg .To = First.Last@Mycompany.com

mailMsg .Subject = "Subject";

mailMsg .Body = "Body";

SmtpMail.SmtpServer = "MyCompanyserver";

SmtpMail.Send(mailMsg);

if the mailMsg.To is send to First.Last@Mycompany.com then everything is
Ok., But if I send to outside other than my company email address, Then

I got error msg "Could not access 'CDO.Message' object", Why? Thanks.

Jason
Gary Chang[MSFT] - 18 May 2005 08:51 GMT
Hi Jason,

>......
>if the mailMsg.To is send to First.Last@Mycompany.com then everything
>is Ok., But if I send to outside other than my company email address, Then
>
> I got error msg "Could not access 'CDO.Message' object",

It appears your code works fine while sending email within your company
domain, but fails when trying to send to the outside recipients, am I right?

If so, your code is alright, but it may be some problems when you wanjt to
access your smtp server send emails outside, do you have tried to use the
default smtp server to the Message object(e.g. SmtpMail.SmtpServer =
"Mail";),  in some scenario if you do not have the permission to relay
against your SMTP server will cause this problem.

Please refer to the following newsgroup thread for detailed information:
http://groups-beta.google.com/group/microsoft.public.win32.programmer.messag
ing/browse_frm/thread/d096f6133966c14/7829036db2df4ab8?q=%22Could+not+access
+%27CDO.Message%27+object%22&rnum=12&hl=en#7829036db2df4ab8

Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
Jason - 18 May 2005 23:04 GMT
Hi Gary,

   I follow the info form the link, still no luck, by the way, if I use
Mail as server name, No any email can send out.

Jason

> Hi Jason,
>
[quoted text clipped - 14 lines]
>
> Please refer to the following newsgroup thread for detailed information:

http://groups-beta.google.com/group/microsoft.public.win32.programmer.messag

ing/browse_frm/thread/d096f6133966c14/7829036db2df4ab8?q=%22Could+not+access
> +%27CDO.Message%27+object%22&rnum=12&hl=en#7829036db2df4ab8
>
[quoted text clipped - 7 lines]
> Get Secure! ¡§C www.microsoft.com/security
> Register to Access MSDN Managed Newsgroups!

http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
> &SD=msdn
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Gary Chang[MSFT] - 19 May 2005 10:54 GMT
Hi Jason,

>I follow the info form the link, still no luck, by the way, if I use
>Mail as server name, No any email can send out.

OK, if the suggestion in that newsgroup thread didn't hit your problem, we
need to collect more information about your scenario:

Do you have any problem when you use the Outlook(or OE?) to send email
outside your company?

How many E-mail accounts do you use in your Email client(Outlook or OE?)
and what's the smtp server of your default email account, is it your
comapny smtp server?

Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
Jason - 19 May 2005 21:58 GMT
Hi Gary,

 Thanks for your help, It works now.

Jason

> Hi Jason,
>
[quoted text clipped - 20 lines]
> Get Secure! ¡§C www.microsoft.com/security
> Register to Access MSDN Managed Newsgroups!

http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
> &SD=msdn
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Gary Chang[MSFT] - 20 May 2005 07:34 GMT
Great Jason, we are glad to know you fixed this problem, good luck!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.