|
Try This One it should work...
System.Net.Mail.MailMessage mm = new System.Net.Mail.MailMessage();
mm.Subject = "Test Mail";
mm.Body = "This is a Test mail";
mm.IsBodyHtml = true;
System.Net.Mail.SmtpClient ss = new System.Net.Mail.SmtpClient();
System.Net.Mail.MailAddress ma = new System.Net.Mail.MailAddress("test@test.com");
mm.To.Add(ma);
ss.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.PickupDirectoryFromIis;
ss.Host = "setyouripaddress her";
ss.Send(mm);
Koushik
|
|
|
|
|
i think your smtp have a prob
try this its a working code hope your problem will solved and try to use "try/catch" in your code an then read the exception if code dont work that will explain you whats the problem.....
try
{
MailMessage objMail;
objMail = new MailMessage();
objMail.From = "Sender address";
objMail.To = "Recipient address";
objMail.Subject = "Subject of your mail";
objMail.BodyFormat = MailFormat.Html;//you can use text for text message
objMail.Priority = MailPriority.High;
objMail.Body = "Body of your mail";
SmtpMail.SmtpServer = "Your smtp server name";
SmtpMail.Send(objMail);
objMail = null;
}
catch(Exception ex)
{
Response.Write(ex);//this will tell you the problem if got
}
shezi
|
|
|
|
|
i am getting a error like this
Could not access 'CDO.Message' object
|
|
|
|
|
Which OS you are using ?
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
|
|
|
Hi all,
Greetings.I need to detect the pop up bloker using javascript. if Pop is turned on i've to display a message "POPUP ON", if it is off have to display "POPUP OFF". I've tried out with some coding from net. But it is not working. Can any one of you help me to solve this issue as soon as possible. Its urgent.
Thanks in advance.
Babu
|
|
|
|
|
|
Hi All,
HoW do we differ HTMl and web Server Controls in as.net
when we go for HTML and Web Server controls,
Pls help
Thanks n Advance
|
|
|
|
|
Hi shakeela,
It's easy to learn this controls..open any online tutorial...and study ....
As a beginner use this-> http://www.w3schools.com/aspnet/default.asp
Regards
Alex.
|
|
|
|
|
your ASP.net controls with have a runat server tag..
Regards
|
|
|
|
|
You need to define HTML controls. Having HTML tags in your aspx page simply means you have plain HTML, same as always. Server controls are the ones that get parsed and executed by the server, the ASP.NET ones start with asp: but theres others and they always have runat="server" . HTML controls are HTML tags with runat="server" , the resulting control being one from System.Web.UI.HtmlControls .
If you want to get really gritty all HTML tags between two controls are in fact converted to a Literal control but thats not really important.
|
|
|
|
|
|
HTML controls are light weight controls
Web server controls are heavy weight controls
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Hi All,
Am in learing stage .In both server.tranfer and server.execute why can't we transfer querystring values along with request.
I read server.transfer reduce roundtrips it performs redirection only on browser side but not server side. Iam very confusing.
Pls any body clarify about server.transfer doesn't transfer querystring values how it reduce roundtrips. Y url doesn't change
Thanks n Advance
|
|
|
|
|
Hi,
I think that this article: http://www.developer.com/net/asp/article.php/3299641
will help you. It's so clear and explains the diferences between Response.Redirect and Server.Transfer...
|
|
|
|
|
I am using type.InvokeMember() , for almost 10 other functions , this works perfectly fine. However for 1 particular function it throws me the error "Member not found". Does any body have the idea , what could be the reason.
|
|
|
|
|
Hello,
This is alex ,i am a s/w engg; working on asp.net in my project i want to extract CAB file using asp.net c# can anybody help me to find the solution...
I am waiting for your reply....
Alex.
|
|
|
|
|
|
plz any one help me regarding storing image file binary info in to a text file. and also again read that text file and form a image.....its urgent plz
Pradeep Reddy
|
|
|
|
|
FileStream fileStream = new FileStream("c:\\Admin.jpg", FileMode.OpenOrCreate, FileAccess.Read);<br />
<br />
long len;<br />
<br />
len = fileStream.Length;<br />
<br />
Byte[] fileAsByte = new Byte[len];<br />
<br />
fileStream.Read(fileAsByte, 0, fileAsByte.Length);<br />
<br />
<br />
FileStream fs = new FileStream(Server.MapPath("c:\\a.txt"),FileMode.Create); <br />
BinaryWriter bw = new BinaryWriter(fs);<br />
bw.Write(fileAsByte);<br />
fs.Close();<br />
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Thank u
Pradeep Reddy
|
|
|
|
|
Hi Experts,
GOOd Morning,
This is regarding view state and hidden field in asp.net
I have storing information in viewstate["strInfo"]="hello world" in page1
my doubt is can i get access to viewstate["strInfo"] in another page? if not pls give clarification.
i read in some book Hidden field can post information to another page. If it is yes Why can't viewstate it is also stored in hidden field only
Pls give clarification asap.
Thanks in Advance
|
|
|
|
|
If it's urgent, please use "Session" or "Cache" instead of ViewState.
I dont think that ViewState can be accessd from another page. cuz the ViewState is stored in the hidden field by using algorithm. so, if you are going to another page, the value of this hiddenfield wont be avaliable in another page.
so, maybe. you can use Session. eg: Session("a") = "Hello World!"
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|