can someone tell me ?Why i am getting the following error .When i tries to compile the following .Thanks in Advance.Error 1 'System.Net.Mail.MailMessage.Subject' is a 'property' but is used like a 'method' Error 2 'System.Net.Mail.MailMessage.Body' is a 'property' but is used like a 'method'
Error 3 No overload for method 'Send' takes '0' arguments
Code:private void SendMail() { MailMessage Message=new MailMessage(); Message.To.Add("[email protected]"); Message.Subject("Clark Weekly Sales"); Message.From = new MailAddress("[email protected]"); Message.Body("Automatic Weekly Sales For Clk Brand"); SmtpClient smtp = new SmtpClient("mail.alhokair.com.sa"); smtp.Send(); }![]()




Reply With Quote