?
Solved

Getting the default mail host using delphi

Posted on 2000-04-04
1
Medium Priority
?
293 Views
Last Modified: 2010-04-04
I am wanting to use the TNMSMTP component to send mail. I would however like to know how it is possible to get the default mail client's host address.
 
Is it an API call or a registry setting?

Thanks
0
Comment
Question by:Fugazi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
Carpathia earned 300 total points
ID: 2686726
Use the registry to read the value of "Default Mail Account" from the key

HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager

This is a number (on my machine its 2).

Now get to this tree

HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts

and open the key of the number youve just got (ie, \2 on my machine).

This contains info for the default account.

From this you can get
SMTP Port
and
SMTP Server.

Have a look in regedit to understand what I mean.

Hope this helps.



0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question