asp.net mailserver set up using exchange 365

We had  exchange server 2003, recently we updated MS office to MS Office 365 which there is no static IP for exchange server anymore.

We have an asp.net website which can send out emails using exchange server, the following is part of web.config file in asp.net application.

Now what should I change to make mail server work again?

<configuration>
      <appSettings>
              <add key="MailServer"  value="192.168.1.7"/>
      </appSettings>
</configuration>
HemlockPrintersAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Randy DownsOWNERCommented:
You could try the server's Internet ip that you use for your email clients. if you don't know the ip just ping it from CMD prompt.
Paul MacDonaldDirector, Information SystemsCommented:
<configuration>
      <appSettings>
              <add key="MailServer"  value="mail_server_name.domain.tld"/>
      </appSettings>
</configuration>
HemlockPrintersAuthor Commented:
There is no IP or mail server name of outlook 365 mail server
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

Randy DownsOWNERCommented:
Do you have the option of setting up an email client like Outlook or confined to use webmail? If the former you will get a outgoing email server that you could use.

Your Internet Service Provider (ISP) probably provides this for you as well.

If you get the outgoing email server from your ISP or Exchange email server you can setup your application.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
https://support.office.com/en-au/article/Outlook-settings-for-POP-and-IMAP-access-for-Office-365-for-business-or-Microsoft-Exchange-accounts-7fc677eb-2491-4cbc-8153-8e7113525f6c

Your smtp server is most likely going to be smtp.office365.com using port 587 and tls.  You may be using your own domain and the way to check is by logging into your admin manager portal for exchange.  

While logged into the admin manager panel, set  the account you are sending from and authorize remote access.  I no longer have access to office365 but that is what worked.  Check your settings in exchange to verify.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big MontyWeb Ninja at largeCommented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.