.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How do I send E-mail via the Microsoft exchange server?

Posted By: Pravin     Posted Date: August 16, 2011    Points:5   Category :ASP.Net
I need sample code using C# and also i need to send mail without using User password credentials.

Responses
Author: Sasi Prabhu             
Posted Date: August 17, 2011     Points: 20   


Try:

System.Web.Mail.SmtpMail.Send(from,to,subject,body);



Thanks & Regards,
Sasi Prabhu.
Author: Gowthammanju             
Posted Date: August 17, 2011     Points: 20   

try these as

http://office.microsoft.com/en-us/outlook-help/what-is-an-exchange-server-e-mail-account-HA001095504.aspx

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: August 17, 2011     Points: 20   

try these structure as

string fromEmail = "xxx@x.co.in";//sending email from...

string ToEmail = "xxx@s.co.in";//destination email

string body = txtbody.Text;

string subject = "sample subject";

try


{
SmtpClient sMail = new SmtpClient("xxx1.xxx.local");//exchange or smtp server goes here.
sMail.DeliveryMethod = SmtpDeliveryMethod.Network;
sMail.Send(fromEmail,ToEmail,subject,body);
}
catch(Exception ex)
{
//do something after error if there is one
}


Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend