Latest developer linksBookmark and Share
 
HomeThis WeekTop MonthTop AlltimeSearchRegisterFAQ
  
 
Submit Your Link
Please login to submit your Link
 

Send mail from my application

Posted: Dec/14/2010   By: nikhil   Points:15   Category: .NET  - ASP.Net    Views:129   Vote Up (0)   Vote Down (0)    

Hi,

      I have a requirement  where i need to send mail from my application. I used the following code to send mail

        MailMessage msgMail = new MailMessage();
        MailAddress fromAdress = new MailAddress("praveen.k@gmail.com","Mechano");
        msgMail.From = fromAdress;
        msgMail.To.Add("praveen@gmail.com");
        msgMail.Subject = "Issue on Website";
        msgMail.IsBodyHtml = true;       
        //msgMail.BodyFormat = MailFormat.Html;         
        string strBody = "This is test message";        
        msgMail.Body = strBody;
        SmtpClient sClient = new SmtpClient("127.0.0.1", 25);
        //sClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
        sClient.Send(msgMail);


The above code  is neither working in my local system not showing error, but after the application has deployed in remote server(this is shared server) the code is working. What might be the problem?


Thanks

Praveen






View Complete Post


Comments:
Be the first to comment this post.
 
Post Comment
Please login to post your comment
More Related Resources

Create Navigation in asp.net web application

  
Create Navigation in asp.net web application. Create Navigation in asp.net

send alert message to user if close internet browser before save web form data

  

 Hi, I have window form to let user fill data, I want to alert user if close web browser before saved web form data, could anyone provide any clue?

 

Thanks,

Martin


will a 32-bit web application run as WOW64 on a 64-bit server?

  

Hi

I need to know if a web application deployed in a 64-bit server runs as a WOW64 process or a 64-bit process if the web application's pages are compiled as PE 32/x86 ?

I mean I have read a lot about normal console applications or executables with PE 32/x86 run as WOW64 on 64-bit servers. But what about web applications( all i can compile is the pages which are dlls)? The only process I can think of is w3wp.exe for web apps. Please explain. I am confused.

Thanks in advance

Vineeth


How to remove the MY ASP.NET APPLICATION header and the login button and box

  

Visual Web Developer 2010 Express

Windows 7


I have chosen ASP.NET Web Site, rather than ASP.NET Empty Web Site when I created my website.  I thought just a little first step would help.


I now find that I am left, in default.aspx, with this extremely annoying bold header -

MY ASP.NET APPLICATION at the top of the page, and a little login function in the  top right corner.

All attempts to enter the area produce a no entry icon.

How do I get rid of / change this header area? Or did I get myself locked into this by choosing Express and/or ASP.NET Web Site rather than an empty one?

I sure do like the structuring of the forums here.  I feel comfortable in this beginner's one for now, thank you.Innocent ASP.NET wise at least.

With thanks, in anticipation of an answer, please.

Best regards


Philip Hunt

Perth, Western Australia

(soon to launch www.howandwhywonderbooks.info)








Can I change the default "ASP.NET Web Application" that appears every time I create a new project?

  

I'm using VS2010 and I'm trying to follow along with these videos: http://www.asp.net/general/videos and the guy in the video is using Visual Web Developer Express and when he creates a new website it's all nice and simple with a bare bones Default webpage and that's cool. Well, me in my Visual Studio 2010 when I create a new project I get this elaborate "My ASP.NET Application" page with an About page and a Login page and CSS and Jquery and it's just too, too much. Now, of course I could just create an empty ASP.NET application, but that goes too far the other way; I have to start from scratch and add the default page myself and try to reproduce exactly what the code in the video looks like and I can't really see the screen that well. Is there any way I could change my default template to what the gentleman in the video uses?


Can I use WebMatrix (razor ) and Visual Studio on same application?

  

Here is what I am  trying to do. I already have an application (web form) that  works fine coded in VS 2010 web forms.
Webmatrix has some features that I want to use and add to my application. Ordinarily, I will create these as user controls and simply  reuse them throughout the site.
Example: Say I wanted to display  TwitterFeed.cshtml on the front page of my home page named default.aspx, how will I do this for the Razor syntax to be rendered by my existing application.
What do I need to modify in the web.config (of my existing application) for this to work?
cheers,

yousaid

 

.

 


set up users' rights to a web application

  

Hello, i'm pretty new to asp.net. I have created a web application in vs2008 and a login page as well. My issue is that i need to have three types of users each one with different rights to my web application. For example, one type is the admin who will be the only one who creates and deletes simple users-this is the second type (by simple users i mean those who will have limited access to the application\) and the third is the advanced users who have some permissions but not as the admin. I would appreciate any answer. Excuse my english :)


Weird memory behavior on application pool recycle

  

Hello,

I'd like to describe strange issue I've noticed while analyzing my asp.net application in production and ask for some advice or opinion on the following matter.

Appilication usually runs with some 80-90 MB of memory footprint. This seems stable since no memory leaks have been detected so far - no slight increase in memory usage over time. Yet, problem occurs when application pool recycles (I'm using shared hosting and judging by logs it occurs either when app is idle for 20 mins or every ~30 hours - something like that). The issue is that used memory almost doubles for some period on recycle - it goes to some 160-170 MBs without any explanation. This is confusing, since it is common claim that recycling should purge the memory and all other resources - at least I get it that way. System holds this amount of memory for some 7-8 hours and then memory usage drops to it's usual level of 90-100 MB, again, with no apparent reason (at least not know to me). All the time, application seems to work well - no significant delays or troubles with site availability - to the users everything seems ok, no complaints so far. When looking at the memory consumption over time graph - it looks almost like a step function.


The important thing is that I haven't been able to reproduce this sort of behaviour in my testing environment. Occassionaly, I've been getting notes from provider administrators that my app is using more resources than allowed and this really bugs me.

So, what I would like to know - is there any possible scenario where application pool recycling does not release all memory resources ? Is there any advice or guideline what I should focus on ? I'm not an expert in this area, but I've been reading about things like overlapping recycling, serialization problems on recycle and couple more issues ... Any ideas ? Similar experience ?

Thanks






Students Trainings Application in VB.Net

  

Hello Everybody, I am developing a new application for Students Training. Could you just give me a brief idea of how the database design should be? And could you provide a sample application similar to my requirement? Following is the requirement of the Application,

The objectives of the program  or application are  :

  • Get Information about the total  number of students trained in all company's department
  • Get Information about the total  number of students  who were either withdrew/ apologized  /rejected  
  • Anticipate of the future needs for student's work placement opportunities ( numbers of students as well as the majors )

On light of the objectives mentioned above I consider the following data for the application preparation :

Company's Department Needs  

  •   Department
  •   Major
  •   Number of students for each major
  •   Supervisor
  •   Mobile Number

If it is  possible when entering students details the program will automatically register him/her in the Department that has  vacant place and already fit the requirements of the certain department .

Internship  Information

  • Name
  • Major
  • College
  • Training Period
  • Training Department
  • Training Supervisor
  • Students Mobile Number
  • Category : Internship or Summer  Training ( for summer training we require , Guardian No - Grade  as Company host school students )   
  • Status : Completed  or Not  if not , a field is required to enter the reason
  • No of Absence Days
  • Bonus   : yes  ( field is required to enter the amount )   or no


best way to kill session from one application to another application in C#

  

Which is the best way to kill session from one application to another application in C# 


 
Categories:
.NET
Java
PHP
C/C++/VC++
HTML/XML
SAP
MainFrames
Data Warehousing
Testing
MySQL
SQL Server
Oracle
Javascript/VB Script
Others
Login
 
 
 
 
 Forgot password
 Contact Us   Terms Of use   Share your knowledge