Wrox Programmer Forums
|
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 7th, 2006, 01:35 AM
Registered User
 
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to amol.mahajan85@gmail.com
Default sending email through asp.net

hi all,
  I facing a problem while sending email through my website...
I am using share hosting of server with 1.1 framework of .NET
the codes given below works at local but when i paste it on the server i am getting runtime errors...
  try
 {
 CDO.MessageClass objmail=new CDO.MessageClass();
 objmail.From=from.Value;
 objmail.To=to.Value;
 objmail.Subject=subject.Value;
 objmail.HTMLBody=body.Value;
 objmail.Send();
 Response.Write("Mail Deliveerd SucessFully");

 }
 catch(Exception ex)
 {
    Response.Redirect("error.aspx?msg="+ex.Message,fal se);
 }




 
Old September 7th, 2006, 08:32 PM
Wrox Technical Editor
 
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What are your error msgs?
What shared hosting are you using?

You will probably need to specify a SmtpServer provided by your shared hosting.

CDO (Collaboration Data Objects) are generally used in classic ASP pages.
System.Web.Mail is prefered if your using ASP.NET 1.x, although System.Web.Mail is actually a wrapper around the CDO primitives.

A couple links of interest:
  SMTP Authentication using System.Web.Mail (CDOSYS): http://www.codeproject.com/dotnet/Sy..._SMTP_AUTH.asp
  System.Web.Mail, OH MY!: http://www.systemwebmail.com/

- Adam Kahtava [http://adam.kahtava.com]
 
Old October 19th, 2006, 12:13 PM
Registered User
 
Join Date: Oct 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rajdotnet
Default

can you tell me the exact error msg

Raj





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending email in VB.net lowell .NET Framework 2.0 3 November 30th, 2008 11:51 AM
sending email from asp.net/sqlserver on a particul hepsy.i ASP.NET 1.0 and 1.1 Professional 1 July 11th, 2008 08:09 AM
How to Sending an email in asp.net 2.0 using C# Bashu C# 2005 4 August 14th, 2007 03:29 AM
Sending Email with ASP.NET stu9820 ASP.NET 1.0 and 1.1 Basics 19 February 9th, 2007 03:50 AM
Error in sending email from asp.net asif_sharif ASP.NET 1.0 and 1.1 Professional 4 January 7th, 2006 05:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.