How to configure Exchange server email ?

Varshini
Varshini used Ask the Experts™
on
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 ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
MASEE Solution Guide - Technical Dept Head
Most Valuable Expert 2017

Commented:
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

Author

Commented:
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;
 emailClient.Send(message);
 
asp.net
<system.net>
    <mailSettings>
      <smtp from="ersemail@aa.com">
        <network host=" exchange05.myserver.local" port="25" userName="="ersemail@aa.com" password="XXXXXXXX"/>
      </smtp>
    </mailSettings>
  </system.net>




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
MASEE Solution Guide - Technical Dept Head
Most Valuable Expert 2017

Commented:
This will answer your question I guess
http://forums.asp.net/t/1019543.aspx/1

Author

Commented:
Mailbox unavailable. The server response was: 5.7.1 Unable to relay
EE Solution Guide - Technical Dept Head
Most Valuable Expert 2017
Commented:
you will have to make sure that the IP address the site is on has also been allowed relay permissions. Configure this in your receive connector

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial