Receive Emails from Contact Form to my domain email address

Receive Emails from Contact Form to my domain email address

Dear All,

I am trying to set up a contact form in .NET, so that the users on my site can contact me, however I am getting an error :-

System.Net.Mail.SmtpException: 'Mailbox name not allowed. The server response was: Relaying disallowed as @gmail.com>'

My code is as follows :-

        private static void SendEmail()
        {
            var message = new MailMessage();
            message.To.Add(new MailAddress("myUserInbox")); 
            message.From = new MailAddress("user's email address", "user's Name", Encoding.UTF8);
            message.Subject = "This is a test from app";
            message.Body = "This is the body";
            message.IsBodyHtml = true;

            using (var smtp = new SmtpClient())
            {
                var credential = new NetworkCredential
                {
                    UserName = "my user inbox",
                    Password = "my password"
                };

                smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
                smtp.EnableSsl = true;
                smtp.Host = "smtp.zoho.com";
                smtp.Port = 587;
                smtp.UseDefaultCredentials = false;
                smtp.Credentials = credential;
                smtp.Send(message);
            }
        }

Do I need to do any changes to this code?

Thanks

Johann