Solved

How to use the exchange server to make a PRG. that send mails

Posted on 2001-06-27
4
176 Views
Last Modified: 2010-04-06
dear's
we have a windows NT 4 server and SQL Server database.
i want to collect data from database and send it as report, text  (what ever) to the managers on their mails.
this automatice.
Thanks
Ahmed Ragab
0
Comment
Question by:RAGAB2000
  • 2
4 Comments
 

Author Comment

by:RAGAB2000
ID: 6230873
Thanks
0
 
LVL 8

Expert Comment

by:Cesario
ID: 6230994
use the MAPI Unit to send data to the exchange Server...

We have no exchange Server installed on ower system. so I am not able to test the source code....

but it very easy to unterstand the Procedure and Functions in the MAPI Unit

Best Regards

Cesario
0
 
LVL 1

Accepted Solution

by:
drnadeem earned 100 total points
ID: 6236825
put a button and NMSMTP component on a form. Prepare your report using query or whatever. Then you can send it as an attachement to the mail.


procedure TMailF.NMSMTP1Connect(Sender: TObject);
begin
 NMSMTP1.SubType := mtPlain;
 with NMSMTP1.PostMessage do begin
    FromAddress := 'your@yourmail.com'; //your email
    ToAddress.Add('manager1@yourcompany.com');//manager1
    ToAddress.Add('manager2@yourcompany.com');//manager2
    ToCarbonCopy.Add('cc@yourcompany.com');//cc address
    ToBlindCarbonCopy.Add('bcc@yourcompany.com');//bcc address
    Subject := 'Your subject';
    Body.Add(SubEd.Text);//subEd is memo containg body.
    Attachments.Add('c:\windows\desktop\report.doc');
  end;
  NMSMTP1.SendMail;
  NMSMTP1.disConnect;
end;

procedure TMailF.Button1Click(Sender: TObject);
begin
  NMSMTP1.Host := 'mail';
  NMSMTP1.Connect;
end;
0
 

Author Comment

by:RAGAB2000
ID: 6245485
Thanks
I test the solution and it working will
Thanks again
Ahmed Ragab
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
delphi prevent click fast 2 216
Delphi application Soap connection 5 103
Delphi Mdi application Child forms get behind control 7 211
Base1 Encode/Decode 3 77
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 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