Error : You Should Authenticate first
-
Hello friends I am trying to send mail in asp.net when it is from Example ... abcd@example.com to efgh@example.com it is reaching perfectly but whenever i send mail to different id like yahoo error is coming as You should authenticate first... Please explain how to make it work on other id's too Thank You
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
-
Hello friends I am trying to send mail in asp.net when it is from Example ... abcd@example.com to efgh@example.com it is reaching perfectly but whenever i send mail to different id like yahoo error is coming as You should authenticate first... Please explain how to make it work on other id's too Thank You
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
-
Can you give us a bit more detail about what you are doing: Is it a localhost or web server? Whats the full error message? Have you tested many other e-mail address?
i have tested it on the local server ... and code is System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.From = new MailAddress("abcd@example.com"); message.To.Add(new MailAddress("mr.abcd@yahoo.com")); message.Subject = "This is my subject"; message.Body = "This is a test message"; SmtpClient client = new SmtpClient(); client.Send(message);
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
-
i have tested it on the local server ... and code is System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.From = new MailAddress("abcd@example.com"); message.To.Add(new MailAddress("mr.abcd@yahoo.com")); message.Subject = "This is my subject"; message.Body = "This is a test message"; SmtpClient client = new SmtpClient(); client.Send(message);
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
Is the server inside a local network? First test if you can send e-mails to a local address then test sending e-mails to outside addresses like yahoo, hot mail etc it could be that your mail server isnt yet set up to send e-mail to those types of addresses
-
Is the server inside a local network? First test if you can send e-mails to a local address then test sending e-mails to outside addresses like yahoo, hot mail etc it could be that your mail server isnt yet set up to send e-mail to those types of addresses
ok...actually i dont know how to setup mail server to send mails to different server
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
-
ok...actually i dont know how to setup mail server to send mails to different server
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
-
i have tested it on the local server ... and code is System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.From = new MailAddress("abcd@example.com"); message.To.Add(new MailAddress("mr.abcd@yahoo.com")); message.Subject = "This is my subject"; message.Body = "This is a test message"; SmtpClient client = new SmtpClient(); client.Send(message);
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
Try with the same code.. System.Net.Mail.MailMessage objEmail = new System.Net.Mail.MailMessage(From, To); objEmail.Subject = "Subject"; objEmail.Body = "Body"; objEmail.IsBodyHtml = true; System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient(); client.Host = "smtp.orgname.com"; client.UseDefaultCredentials = false; System.Net.NetworkCredential auth = new System.Net.NetworkCredential(From, "P@ssw0rd"); client.Credentials = auth; client.Send(objEmail); In the above code client.Host = "smtp.example.com" where example is abcd@example.com.
smile :-)
-
Try with the same code.. System.Net.Mail.MailMessage objEmail = new System.Net.Mail.MailMessage(From, To); objEmail.Subject = "Subject"; objEmail.Body = "Body"; objEmail.IsBodyHtml = true; System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient(); client.Host = "smtp.orgname.com"; client.UseDefaultCredentials = false; System.Net.NetworkCredential auth = new System.Net.NetworkCredential(From, "P@ssw0rd"); client.Credentials = auth; client.Send(objEmail); In the above code client.Host = "smtp.example.com" where example is abcd@example.com.
smile :-)
you should have some config in web.config for the post email's smtp,username,password! like this: <configuration> <system.net> <mailSettings> <smtp from="xxx@xx.com"> <network host="mail.xxx.net" password="xxx" port="25" userName="webmaster" defaultCredentials="false"/> </smtp> </mailSettings> </system.net> </configuration>
I love li li huang , ha ha , but you don't who is she!