Solved

How to do the email?

Posted on 2001-08-09
2
142 Views
Last Modified: 2010-04-06
I would like to ask how can I do the emai by using the own company server..how to write the program that can call all email to all the person in my contact list..my address book?
0
Comment
Question by:lbseong
2 Comments
 

Accepted Solution

by:
BryGuy earned 50 total points
ID: 6368575
Here is a code snip that uses MAPI to recieve the addresses from your address book and places them in a ListBox ... you should be able to modify it for your needs:

...
var
  RecipDesc     : TMapiRecipDesc;
  Recips        : ulong;
  RecipDescs    : PMapiRecipDesc;
  i             : integer;
...

if (MapiAddress (0, 0, 'Select Recipients', 4, '', 0, RecipDesc, 0, 0,
    @Recips, RecipDescs) = SUCCESS_SUCCESS) then
  begin
    for i := 0 to Recips - 1 do
      ListBox1.Items.Append (PMapiRecipDesc(PChar(RecipDescs) + i *
        SizeOf(TMapiRecipDesc))^.lpszAddress);
    MapiFreeBuffer (RecipDescs);
  end;

As for sending the mail - there are many methods... SMTP, you can get the direct MX address for SMTP server(s), use MAPI to send, etc...

Bryan Ashby
0
 

Author Comment

by:lbseong
ID: 6406771
let said i would like to call the email function in one system,can it be done?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi component that can load a DLL in design time? 8 92
Delphi inherited method 6 78
enhance the following code 3 42
Firemonkey allowing RTL on android 6 56
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…

735 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