Click here to Skip to main content
15,919,245 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionTwo Forms Problem Pin
Khan.Bangash5-Dec-06 22:22
Khan.Bangash5-Dec-06 22:22 
AnswerRe: Two Forms Problem Pin
pineapple265-Dec-06 22:45
pineapple265-Dec-06 22:45 
QuestionSitemap, removing the parent Pin
phimix5-Dec-06 21:24
phimix5-Dec-06 21:24 
QuestionSend mail in c# code(asp.net 1.1)? Pin
ahmadnaghsh5-Dec-06 20:53
ahmadnaghsh5-Dec-06 20:53 
AnswerRe: Send mail in c# code(asp.net 1.1)? Pin
Bijgupt5-Dec-06 21:00
Bijgupt5-Dec-06 21:00 
AnswerRe: Send mail in c# code(asp.net 1.1)? Pin
talk2prabir@yahoo.co.in5-Dec-06 21:19
talk2prabir@yahoo.co.in5-Dec-06 21:19 
AnswerRe: Send mail in c# code(asp.net 1.1)? Pin
phimix5-Dec-06 21:25
phimix5-Dec-06 21:25 
AnswerRe: Send mail in c# code(asp.net 1.1)? Pin
talk2prabir@yahoo.co.in5-Dec-06 22:12
talk2prabir@yahoo.co.in5-Dec-06 22:12 
Hello,
In my recent project I used sending mails functions.
Actually 2 approaches are their.
1. In this case the mails go to bulk /spam folder
2. In 2nd approach mail will go to inbox(u r using authentication here as u have to mention uid/pwd of sending mailer)
I am putting the exact codes that I have written previously.
______________________________________________________
1st Approach
public void SendMail()<br />
       {<br />
           MailMessage msgMail=new MailMessage();<br />
           msgMail.To=emailTo;<br />
           msgMail.From="test@test.com";<br />
           msgMail.Subject="test visitors mail";<br />
           msgMail.Body="whatever u want";<br />
           SmtpMail.SmtpServer = "";<br />
           SmtpMail.Send(msgMail);<br />
           <br />
       }<br />

2nd Approach(same as 1st approach with some additional fields of authentication)
public void SendMail()<br />
		{<br />
			MailMessage msgMail=new MailMessage();<br />
			msgMail.To=emailTo;<br />
			msgMail.From="test@test.com";<br />
			msgMail.Subject="test visitors mail";<br />
			msgMail.Subject="test visitors mail";<br />
			msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");	//basic authentication<br />
			msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "test@test.com"); //set your username here<br />
			msgMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "testpassword");	//set your password here<br />
			SmtpMail.SmtpServer = "mail.test.com" ;//put ur smtpout here<br />
			SmtpMail.Send(msgMail);<br />
			<br />
		}


Thanks,

Prabir
AnswerRe: Send mail in c# code(asp.net 1.1)? Pin
Vasudevan Deepak Kumar6-Dec-06 1:01
Vasudevan Deepak Kumar6-Dec-06 1:01 
QuestionASP.Net 2.0 Menu Pin
deepaks35-Dec-06 20:51
deepaks35-Dec-06 20:51 
QuestionShared folder's Pin
nannapanenikamalnath5-Dec-06 20:32
nannapanenikamalnath5-Dec-06 20:32 
AnswerRe: Shared folder's Pin
Vasudevan Deepak Kumar6-Dec-06 6:55
Vasudevan Deepak Kumar6-Dec-06 6:55 
QuestionHelp Needed...For Integrate Payment Gateway in application Pin
NileshUpadhyay5-Dec-06 20:14
NileshUpadhyay5-Dec-06 20:14 
AnswerRe: Help Needed...For Integrate Payment Gateway in application Pin
Frank Kerrigan5-Dec-06 23:37
Frank Kerrigan5-Dec-06 23:37 
QuestionHow do we add Tab controls in ASP.NET Web Application? Pin
pubududilena5-Dec-06 20:10
pubududilena5-Dec-06 20:10 
AnswerRe: How do we add Tab controls in ASP.NET Web Application? Pin
pineapple265-Dec-06 22:54
pineapple265-Dec-06 22:54 
AnswerRe: How do we add Tab controls in ASP.NET Web Application? Pin
Amit Kushwaha5-Dec-06 23:52
Amit Kushwaha5-Dec-06 23:52 
QuestionSuggest CMS Pin
talk2prabir@yahoo.co.in5-Dec-06 20:02
talk2prabir@yahoo.co.in5-Dec-06 20:02 
AnswerRe: Suggest CMS Pin
theJazzyBrain5-Dec-06 21:53
theJazzyBrain5-Dec-06 21:53 
GeneralRe: Suggest CMS Pin
talk2prabir@yahoo.co.in5-Dec-06 21:56
talk2prabir@yahoo.co.in5-Dec-06 21:56 
GeneralRe: Suggest CMS Pin
theJazzyBrain5-Dec-06 22:19
theJazzyBrain5-Dec-06 22:19 
GeneralRe: Suggest CMS Pin
talk2prabir@yahoo.co.in5-Dec-06 22:46
talk2prabir@yahoo.co.in5-Dec-06 22:46 
AnswerRe: Suggest CMS Pin
Vasudevan Deepak Kumar6-Dec-06 6:57
Vasudevan Deepak Kumar6-Dec-06 6:57 
Questionprinting problem Pin
yogita charhate5-Dec-06 19:19
yogita charhate5-Dec-06 19:19 
QuestionPayment Gateway Integration in Application Pin
Viral Upadhyay5-Dec-06 19:14
Viral Upadhyay5-Dec-06 19:14 

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.