Avatar of Varshini
 asked on

How to configure Exchange server email ?

I am using  SMTP for sending  email in  .net build application.
But recently one of my client  gave me the following exchange server details

Exchange server name :

and email id :

 asked me to use this in the application.

But my application not running in the  domain and the users using local machine login and using the application.

But i believe  that if i want to use the exchange server the machine should be login in the domain.
Is this  correct ?

What is different between using SMTP and Exchange server ?

Can i able to send email In my application if i use the exchange server name and email id without changing any coding ? OR i need to change the code for to use exchange server ?
Microsoft SQL Server 2008Microsoft Server AppsMicrosoft Development

Avatar of undefined
Last Comment

8/22/2022 - Mon

It is not necessary that the pc should be in domain to use exchange.
Just configure port 25 i.e. SMTP protocol which is used for sending email.
and configure authentication, That's it

client gave me the following details to configure EMAIL

Exchange server name :  exchange05.myserver.local

Email id : ersemail@aa.com
password : XXXXXXXX

But when i execute the following code

MailMessage message = new MailMessage("aaa@aaa.org","aaab@yahoo.com"," test","test");
    SmtpClient emailClient = new SmtpClient("exchange05.myserver.local");
 System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential("ersemail@aa.com","XXXXXXXX");
 emailClient.UseDefaultCredentials = false;
 emailClient.Credentials = SMTPUserInfo;
      <smtp from="ersemail@aa.com">
        <network host=" exchange05.myserver.local" port="25" userName="="ersemail@aa.com" password="XXXXXXXX"/>

i got this error message :

Mailbox unavailable. The server response was: 5.7.1 Unable to relay

 please let me know how to fix this ?

Since my application using asp.net should i need to configure the SMTP in IIS7 ?

please let me know

This will answer your question I guess
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes

Mailbox unavailable. The server response was: 5.7.1 Unable to relay

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question