Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 940137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:54:20+00:00 2026-05-15T21:54:20+00:00

I had Managed SMTP server configurations in IIS to send email through asp as

  • 0

I had Managed SMTP server configurations in IIS to send email through asp as relay section I added My PC IP Delivery>Advanced I add My Domain name as mail.elarabygroup.com in smart host.

And I added this code:

<script runat="server">
        protected void SendEmail(object sender, EventArgs e)
        {
            SmtpClient smtpClient = new SmtpClient();
            MailMessage message = new MailMessage();
            try
            {
                // Prepare two email addresses
                MailAddress fromAddress = new MailAddress(
                "karim-gamal@elarabygroup.com", "From Kareem Test");
                MailAddress toAddress = new MailAddress(
                "fady-eltegany@elarabygroup.com", "From Kareem Test");
                // Prepare the mail message

                message.From = fromAddress;
                message.To.Add(toAddress);
                message.Subject = "Testing!";
                message.Body = "This is the body of a sample message";
                // Set server details
                smtpClient.Host = "localhost";
                // Uncomment for SMTP servers that require authentication
                //smtpClient.Credentials = new System.Net.NetworkCredential(
                // "user", "password");
                // Send the email
                smtpClient.Send(message);
                // Inform the user
                statusLabel.Text = "Email sent.";
            }
            catch (Exception ex)
            {
                // Display error message
                statusLabel.Text = "Coudn't send the message!";
            }
        }
    </script>

But an error occurs:

Mailbox unavailable. The server response was: 5.7.1 Unable to relay for fady-eltegany@larabygroup.com

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:54:21+00:00Added an answer on May 15, 2026 at 9:54 pm

    Talk to the administrator of the email server. You are apparently not allowed to relay by default, so you may need to provide a login/password combo to the server (see the NetworkCredentials in your snippet).

    You indicate your relay may be mail.elarabygroup.com—is the “e” in there intentional; it’s different from the domain you use in the example? That might be the reason you’re not allowed to relay.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently configured IIS 7.5 to use the SMTP server. Now, I have
I've had a couple of complaints that one of our managed apps is using
I had used Server Explorer and related tools for graphical database development with Microsoft
I read Jeff's blog post that someone had managed to see a closed source
If I had a managed bean as follows: @ManagedBean @RequestSchoped public class Example {
I had been wondering for quite some time on how to manager memory in
I've had a hard time trying to find good examples of how to manage
Had an interesting discussion with some colleagues about the best scheduling strategies for realtime
Had a coworker ask me this, and in my brain befuddled state I didn't
I had been happily coding along on a decent sized solution (just over 13k

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.