?
Solved

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

Posted on 2001-06-27
4
Medium Priority
?
182 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month9 days, 19 hours left to enroll

762 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