Click here to Skip to main content
15,897,371 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Drawing Charts in ASP.NET!! Pin
Not Active11-Jan-09 20:13
mentorNot Active11-Jan-09 20:13 
QuestionChecking For IIS Pin
shavil11-Jan-09 18:26
shavil11-Jan-09 18:26 
AnswerRe: Checking For IIS Pin
Abhijit Jana11-Jan-09 18:51
professionalAbhijit Jana11-Jan-09 18:51 
AnswerRe: Checking For IIS Pin
Not Active11-Jan-09 18:52
mentorNot Active11-Jan-09 18:52 
QuestionControls ovelapping Pin
lackonagy11-Jan-09 18:17
lackonagy11-Jan-09 18:17 
AnswerRe: Controls ovelapping Pin
Not Active11-Jan-09 18:58
mentorNot Active11-Jan-09 18:58 
QuestionSend Mail without IIS Pin
madancode11-Jan-09 18:04
madancode11-Jan-09 18:04 
AnswerRe: Send Mail without IIS Pin
lackonagy11-Jan-09 18:36
lackonagy11-Jan-09 18:36 
Hi,

You don't need IIS for sending emails. What you need is to connect to an SMTP (simple mail transfer protocol) server. Here's a sample:

...
using System.Net.Mail;
...

public bool SendEmail(ref string errMsg)
{
errMsg = "";
bool res = false;
MailMessage msg = new MailMessage("fromemail@someserver.com", "toemail@someserver.com", "This is the subject", "This is the email body...");
msg.IsBodyHtml = false;

SmtpClient client = new SmtpClient("smtp.someserver.com", 25); // the address and port of the SMTP server
client.Credentials = new System.Net.NetworkCredential("username", "password"); // user name and password to the SMTP server

try
{
client.Send(msg);
res = true;
}
catch (Exception e)
{
errMsg = e.Message;
res = false;
}

return res;
}
GeneralRe: Send Mail without IIS Pin
Abhijit Jana11-Jan-09 19:21
professionalAbhijit Jana11-Jan-09 19:21 
AnswerRe: Send Mail without IIS Pin
Aman Bhullar11-Jan-09 19:53
Aman Bhullar11-Jan-09 19:53 
GeneralRe: Send Mail without IIS Pin
Abhijit Jana11-Jan-09 20:04
professionalAbhijit Jana11-Jan-09 20:04 
GeneralRe: Send Mail without IIS Pin
Aman Bhullar11-Jan-09 20:53
Aman Bhullar11-Jan-09 20:53 
GeneralRe: Send Mail without IIS Pin
Abhijit Jana11-Jan-09 21:51
professionalAbhijit Jana11-Jan-09 21:51 
AnswerRe: Send Mail without IIS Pin
Anshumas11-Jan-09 22:18
Anshumas11-Jan-09 22:18 
GeneralRe: Send Mail without IIS Pin
Abhijit Jana12-Jan-09 0:56
professionalAbhijit Jana12-Jan-09 0:56 
RantRe: Send Mail without IIS Pin
Anshumas12-Jan-09 18:25
Anshumas12-Jan-09 18:25 
AnswerRe: Send Mail without IIS Pin
Christian Graus12-Jan-09 0:06
protectorChristian Graus12-Jan-09 0:06 
AnswerRe: Send Mail without IIS Pin
madancode12-Jan-09 17:27
madancode12-Jan-09 17:27 
QuestionGet the ID Number Pin
sjs4u11-Jan-09 18:03
sjs4u11-Jan-09 18:03 
AnswerRe: Get the ID Number Pin
Not Active11-Jan-09 18:20
mentorNot Active11-Jan-09 18:20 
GeneralRe: Get the ID Number Pin
sjs4u11-Jan-09 18:25
sjs4u11-Jan-09 18:25 
GeneralRe: Get the ID Number Pin
Not Active11-Jan-09 18:50
mentorNot Active11-Jan-09 18:50 
QuestionProblem with gridview Pin
sarang_k11-Jan-09 15:59
sarang_k11-Jan-09 15:59 
AnswerRe: Problem with gridview Pin
Not Active11-Jan-09 16:33
mentorNot Active11-Jan-09 16:33 
AnswerRe: Problem with gridview Pin
CrazyCoder2611-Jan-09 17:25
CrazyCoder2611-Jan-09 17:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.