send mail using C#
-
hi i want to send mail using C# but i cant this is my code: MailAddress from = new MailAddress("negin_sarkhosh22@yahoo.com", ":: safir187.com ::"); MailAddress to = new MailAddress("sara_sarakhanom22@yahoo.com", ":: tnz187 ::"); MailMessage message = new MailMessage(from, to); message.Subject = "Safir187.com is updated!"; message.IsBodyHtml = true; message.Priority = MailPriority.High; message.Body = "wedqwe"; SmtpClient client = new SmtpClient("localhost"); client.Send(message); please tell me my mistake thanks
-
hi i want to send mail using C# but i cant this is my code: MailAddress from = new MailAddress("negin_sarkhosh22@yahoo.com", ":: safir187.com ::"); MailAddress to = new MailAddress("sara_sarakhanom22@yahoo.com", ":: tnz187 ::"); MailMessage message = new MailMessage(from, to); message.Subject = "Safir187.com is updated!"; message.IsBodyHtml = true; message.Priority = MailPriority.High; message.Body = "wedqwe"; SmtpClient client = new SmtpClient("localhost"); client.Send(message); please tell me my mistake thanks
What does "cant" really mean? Does the code compile? What happens when you run it? Do you get an error message? Does the server have an active SMTP service? Does your ISP allow sending mails through their system? This is sometimes disallowed to prevent spamming. In that case you have to use the SMTP server that they provide.
Despite everything, the person most likely to be fooling you next is yourself.
-
What does "cant" really mean? Does the code compile? What happens when you run it? Do you get an error message? Does the server have an active SMTP service? Does your ISP allow sending mails through their system? This is sometimes disallowed to prevent spamming. In that case you have to use the SMTP server that they provide.
Despite everything, the person most likely to be fooling you next is yourself.
-
hi i want to send mail using C# but i cant this is my code: MailAddress from = new MailAddress("negin_sarkhosh22@yahoo.com", ":: safir187.com ::"); MailAddress to = new MailAddress("sara_sarakhanom22@yahoo.com", ":: tnz187 ::"); MailMessage message = new MailMessage(from, to); message.Subject = "Safir187.com is updated!"; message.IsBodyHtml = true; message.Priority = MailPriority.High; message.Body = "wedqwe"; SmtpClient client = new SmtpClient("localhost"); client.Send(message); please tell me my mistake thanks
-
Why do people vote this as an unhelpful answer? I'll vote this one as helpful for justice.
I think the OP voted it down because it wasn't the answer HE was looking for.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
hi i want to send mail using C# but i cant this is my code: MailAddress from = new MailAddress("negin_sarkhosh22@yahoo.com", ":: safir187.com ::"); MailAddress to = new MailAddress("sara_sarakhanom22@yahoo.com", ":: tnz187 ::"); MailMessage message = new MailMessage(from, to); message.Subject = "Safir187.com is updated!"; message.IsBodyHtml = true; message.Priority = MailPriority.High; message.Body = "wedqwe"; SmtpClient client = new SmtpClient("localhost"); client.Send(message); please tell me my mistake thanks
hi i guess that you are iranian. your ids name i guess that your mailserver is not active or you mistake to input mailserver name correctly. tell your problem completely to anyone can help u. salam man hads mizanam shoma bayad ye iranie aziz bashid man fekr mikonam ya mailserveretoon faal nist ya shoma dar vared kardanesh eshtebah mikonid be har hal hamoontor ke doostan goftand behtare ke moshgeletoono vazehtar onvan konid.
nobody help you... you have to help you yourself and this is success way.
-
I think the OP voted it down because it wasn't the answer HE was looking for.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
Yeah, over in the ASP.NET forum somebody vote me down just because I told them to get a book or two on programming in ASP.NET since they were a beginner asking an incredibly trivial question.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
Yeah, over in the ASP.NET forum somebody vote me down just because I told them to get a book or two on programming in ASP.NET since they were a beginner asking an incredibly trivial question.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
Well, if people don't want to be part of the process of helping them, what can you do... It's quite common that people don't know what to ask for, how to ask for it, or what information to provide when asking for it. That's all right if they just respond when asked for clarification or more information. If they don't, the thread is not going to go anywhere. At least not in the direction of helping them...
Despite everything, the person most likely to be fooling you next is yourself.