Solved

Getting the default mail host using delphi

Posted on 2000-04-04
1
289 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
1 Comment
 

Accepted Solution

by:
Carpathia earned 100 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

685 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