Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

How to do the email?

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
lbseong
Asked:
lbseong
1 Solution
 
BryGuyCommented:
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
 
lbseongAuthor Commented:
let said i would like to call the email function in one system,can it be done?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now