Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2001-06-27
4
Medium Priority
?
185 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
[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
  • 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 400 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

610 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