Can anyone tell me what this error means:
Mailbox unavailable. The server response was: 5.7.1 <email@example.com>… Relaying denied. IP name lookup failed [18.104.22.168]
I am trying to send emails with this code:
MailMessage message = new MailMessage("firstname.lastname@example.org", txt_email.Text);
message.Subject = "Your Apprenticeship application has been submitted.";
message.IsBodyHtml = true;
message.Body = "Thank you for applying for this role, we will review your application and get back to you as soon as possible.";
SmtpClient client = new SmtpClient("cust3512-1.in.mailcontrol.com");
But when i try sending i keep getting that error, any ideas?
Sounds like a SMTP setup issue. How is the permissions setup? It seems that, that account does not have the required permissions
If i use this:
MailMessage message = new MailMessage("email@example.com", "firstname.lastname@example.org");
The email sends perfectly, but when i change it to this:
MailMessage message = new MailMessage("email@example.com", txt_email.Text);
It gives me the error… Any ideas what this might be?
Also another thing i have noticed is when i change it to this:
MailMessage message = new MailMessage(txt_email.Text, "firstname.lastname@example.org");
It doesn’t seem to give any errors but it does not work how i want it to work. I need the email to send to txt_email.Text.
Why am i having this issue?