|
my code is like this
MailMessage mail=new MailMessage();
mail.To ="anu@gmail.com";
mail.From ="anu2@gmail.com";
mail.Subject = "Hai";
mail.Body = "your subject";
SmtpMail.Send(mail);
it's executing.but i am not getting msg in my mail?what is the problem?
When i am using this code
Smtpmail.send(="anu@gmail.com","anu2@gmail.com","Hai","your subject")
i am getting mail in anu2
can anyone tell what is the problem in above code? is there any thing i haveto set in webconfig file?Then How?.......
Can anyone please help me?..it's urgent
|
|
|
|
|
Hi this is the method with arguments for send
=============================================
public static void Send ( System.String from , System.String to , System.String subject , System.String messageText )
Member of System.Web.Mail.SmtpMail
Summary:
Sends an e-mail message using the specified destination parameters.
Parameters:
from: The address of the e-mail sender.
to: The address of the e-mail recipient.
subject: The subject line of the e-mail message.
messageText: The body of the e-mail message.
So its correct its sendting to anu2
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Actually i want to send mail by using mailmessage object.....
|
|
|
|
|
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
|
|
|
|