Hi,
I am trying to receive email from any email account, but the mail comes from only my email account,
Example: Sender mail@mydomain.com
Receiver: mail@mydomain.com then it come in my inbox.(If sender is gmail, yahoo etc) mail doesn't comes no error at all.
Here's my code
MailMessage Msg = new MailMessage();
Msg.From = new MailAddress("mail@mydomain.com");
Msg.To.Add(txtEmailId.Text);
Msg.Subject = "Send Mail with HTML File";
Msg.Body = txtMessage.Text;
SmtpClient client = new SmtpClient();
client.Host = "mail@mydomain.com";
client.Port = 25;
client.Credentials = new NetworkCredential("mail@mydomain.com", "password");
client.Send(Msg);