Sending multiple e-mail/faxes using Delphi/Exchange

Sending multiple e-mail/faxes using Delphi/Exchange

Post by Aniruddha Surang » Fri, 09 Jul 1999 04:00:00



I am working on a package in Delphi, which performs sort of mail-merging
i.e. I pick contact details from my database, create a formatted e-mail/fax
message and send it to outbox. It just adds messages
to the outbox of MS Exchange, doesn't send except first message. Secondlly,
it doesn't re-schedule message, if it is not gone neither it re-dial the fax
no. All you have to do is send them manually one-by-one.
Can any one guide me, so that I will be able to achive desired task.

Thanks in advance.

Aniruddha

 
 
 

Sending multiple e-mail/faxes using Delphi/Exchange

Post by Jon Krahm » Mon, 09 Aug 1999 04:00:00


Hello Aniruddha

"Aniruddha Surange" <asura...@usa.net> wrote:
>I am working on a package in Delphi, which performs sort of mail-merging
>i.e. I pick contact details from my database, create a formatted e-mail/fax

Go to www.ElectraSoft.com and try their fax API that you can try for
free, including some VB source code.
---
Here is a fax solution including some VB source code.
---
If you want to use ElectraSoft's fax API to send directly from your
own program, read page 3 of the ElectraSoft Manual to learn how to
send a fax directly from your program by passing it the name and fax
number. This Manual is included with ElectraSoft's fax software.  Read
page 61 to learn how to send a fax to a list of fax numbers.

You can also print directly to ElectraSoft's [Convert to Fax].

If you can print, you can fax.

All the Fax Machines in the world are your printers with ElectraSoft's
fax programs.
-------
Code example:
TOP:
 o Put the SEND2FAX.DEL file
 o Print document to: ElectraSoft's Convert to Fax
 o Wait for SEND2FAX.DEL to disappear
 o If done EXIT else back to TOP
EXIT:
======================================VB
X-From_: mwal...@luminet.net  Fri Feb 13 12:53:43 1998
Return-Path: mwal...@luminet.net
From: Michael Walter <mwal...@luminet.net>
To: "'Faxm...@ElectraSoft.com'" <Faxm...@ElectraSoft.com>
Subject: VB Code to batch send faxes
Date: Fri, 13 Feb 1998 12:58:06 -0600

Thanks for your help. I hope this will be of interest to you or your
customers.

Michael Walter
mwal...@luminet.net
(507) 454-3830

"Nenio superas similia troajxo"

 Case "Newfax"
        'Send Faxes to Customers
        'Assumes that 32BF Convert to Fax is already selected
        'as the default printer
        frmProduction.lblmessage.Caption = "Converting and sending Fax
Files..."
        frmProduction.lblmessage.Refresh
        Dim myfile As String
        Dim printline As String
        Dim SRCFILE As String
        Dim DESFILE As String
        Dim MYCHAR As String * 1
        For x = 1 To 50
            SRCFILE = "Z:\FAXES\FAX" & x & ".TMP"
            myfile = Dir(SRCFILE)
            If myfile <> "" Then
                'found a fax so copy correct DEL file
                FileCopy "Z:\BatchFiles\FaxBatch" & x & ".txt",
"C:\32BITFAX\SEND2FAX.DEL"
                'NOW CONVERT TO FAX FORMAT
                Open SRCFILE For Input As #1
                Do While Not EOF(1)
                    MYCHAR = Input(1, #1)
                    If MYCHAR <> Chr(13) And MYCHAR <> Chr(10) Then
                        printline = printline & MYCHAR
                    Else
                        If printline <> "" Then 'because of chr(13)
and chr(10)
                                                'code above, we will
be printing
                                                'a blank line. In
effect double spacing.
                                                'This will prevent
that.
                            Printer.Print printline
                        End If
                        printline = ""
                    End If
                Loop
                Close #1
                Printer.EndDoc
                Do
                DESFILE = Dir("C:\32BITFAX\SEND2FAX.DEL")
                '    'MUST KEEP LOOPING UNTIL THE SENDFAX
                '    'FILE HAS BEEN DELETED
                   If DESFILE <> "" Then
                    Else
                        Exit Do
                    End If
                Loop
            End If
        Next x
        frmProduction.lblmessage.Caption = ""
        frmProduction.lblmessage.Refresh
=======================

====================
CECS EcfFtr2Fh_EL;//Structure for ????????.LOG, ????????.SNW,
????????.SFT
//
*************************************************************************
// *   CURRENT EVENT CONTROL structure:  Output of the CAS function
*
// *      CASGetCurrentEventStatus.
*
//
*************************************************************************
#pragma pack(1)
typedef struct
{
  ECF ECF_2Fh; //EvtContFile;         //ECB==Event Control file of
current event
  FTR FTR_2Fh; //CurrentFileInTransit;//FTR==FILE TRANSFER RECORD
structure

} CECS;

//CECS FAR *lpCurEvtContStrut;
*
#pragma pack()
//
*********************************************************************

//
*************************************************************************
// * EVENT CONTROL FILE structure: The FIXED part of the CAS
specification *
// * for a Control File.  (The variable parts are the cover page text
and  *
// * the File Transfer Records.)...
*
//
*=---------------------------------------------------------------------=*
// * The path and name of a disk file consisting of this structure
plus    *
// * the cover page and the File Transfer Records is the input to the
CAS  *
// * function CASSubmitTask...
*
//
*=---------------------------------------------------------------------=*
// * This structure is also the output of the high-level Toolkit
function  *
// * CCPGetEventControlInfo...
*
// * The variable part is the cover page text. Append a buffer
containing  *
// * the cover page text to this structure, starting at the last
field.    *
//
*************************************************************************
#pragma pack(1)
typedef struct//          OffSet\   /Length
{//                              | |
  BYTE byEventType;          //  0(1)---Type of event (send==0,
receive etc)
  BYTE byTransferType;       //  1(1)---0==200x200,1==100x200,2==File
transfer mode.
  __int16  iStatOfEvt;       //  2(2)---0==Successfully
Completed,1==Waiting...
  WORD wSendTime;            //  4(2)---Time to send,0==now.
  WORD wSendDate;            //  6(2)---Date to send,0==now.
  __int16  iNumOfFiles;      //  8(2)---Max is 32766
  WORD wOffSetToFTR;         // 10(2)---Offset to 1st FTR in TCF on
disk
  char szPhoneNum[47];       // 12(47)--Num to call 118(47) ASCIIZ
  char szApTag[51];          // 59(51)--Application specific tag field
  char szCvrPageFile[13];    //110(13)--Cover Page FileName
12345678.CVR
  BYTE byResved1;            //123(1)---reserved,set to 0
  BYTE byConnectSeconds;     //124(1)---Time of connection: seconds
  BYTE byConnectMinutes;     //125(1)---Time of connection: minutes
  BYTE byConnectHours;       //126(1)---Time of connection: hours
  LONGWORD dwTotalPages;     //127(4)---Total # of pages in all files
  LONGWORD dwPagesSent;      //131(4)---# of pages transmitted so far
  WORD wFilesSent;           //135(2)---# of files transmitted so far
  BYTE byCvrPageFg;          //137(1)---1==Send, 0==don't send cover
page
  WORD wErrorCount;          //138(2)---Total # of tranmission errors
  BYTE byDelFileFg;          //140(1)---Del File after
Send>>0==No,1==if suc,2==Allways
  WORD wEvntHandle;          //141(2)---Assigned by CAS
  char szResved2[31];        //143(31)*reserved,SetTo=0
  char szSubject[21];        //174(21)
  BYTE byConStatus;          //195(1)---Reserved,set to 0
  WORD wFatalError;          //196(2)---Reserved,set to 0
  char szSendFaxBook[9];     //198(9)
  BYTE szResved3[1];         //207(1)
  WORD wConcludedTime;       //208(2)---Time Event Completed
  WORD wConcludedDate;       //210(2)---Date Event Completed
  DWORD dwWorkStationNumber; //212(4)
  BYTE byCvrPageReadFg;      //216(1)---0==No,1==Yes
  BYTE bySuppressPageHdr;    //217(1)---FALSE==Page Header, TRUE==No
Page Header
  char szRemoteCSID[21];     //218(21)--Remote CCITT identification
  char szRecipient[32];      //239(32)--To: field
  char szFaxFromName[32];    //271(32)--From: field
  char szLogoFilePath[80];   //303(80)--Path to logo file that is sent
  char szCvrTxt[CvrTxtSize]; //383(5200)--Marks start of the
Covertext,Ends with 0.

}ECF;     // EVENT CONTROL FILE structure

//
*************************************************************************
// * FILE TRANSFER RECORD structure:  One or more of these are a part
of   *
// * the CAS Control File.  The path and name of this file is the
input to *
// * the CAS function CASSubmitTask.
*
//
*=---------------------------------------------------------------------=*
// * One of these structures representing the file currently being
*
// * transferred is part of the output structure of the CAS function
*
// * CASGetCurrentEventStatus.
*
//
*=---------------------------------------------------------------------=*
// * A linked list of one or more structures containing this structure
is  *
// * the output of the high-level Toolkit function
CASGetEventFileInfo.    *
//
*************************************************************************
#pragma pack(1)
typedef struct//        OffSet\   /Length, sizeof(FTR)==128
{//                            | |
  BYTE  byFileType;        //  0(1)---Type of file
(0==ASCII,1==PCX,2==DCX)
  BYTE  byTextSize;        //  1(1)---0==80colx66lin, 1==132colx88lin
  BYTE  byFileStatus;      //  2(1)---Status of file (opened, moved
etc)
  LONGWORD dwBytesSent;    //  3(4)---Bytes transmitted so far
  LONGWORD dwFileSize;     //  7(4)---Size of file in bytes
  WORD  wPagesSent;        // 11(2)---Pages transmitted so far
  WORD  wPageCount;        // 13(2)---# of pages in this file
  char  szSourceFlNm[80];  // 15(80)--Path name of this file
  BYTE  byAddPageInc;      // 95(1)---Additional 1/8 inch increments
  char  cPageLength;       // 96(1)---Page length in inches,0==11in
  char  szRESERVED[31];    // 97(31)--Reserved for Intel use
}FTR;     // FILE TRANSFER RECORD structure

===============================

         Kind Regards,
         Jon Krahmer, ElectraSoft

 Get newest version of [FaxMail for Windows], [FaxMail Network for Windows]
 or [32bit Fax], free trial: http://www.ElectraSoft.com/
 To read what users are saying about ElectraSoft's fax software, go to
 http://www.ElectraSoft.com/10GoodReasons/

 
 
 

1. Sending multiple e-mail/faxes using Delphi/Exchange

I am working on a package in Delphi, which performs sort of mail-merging
i.e. I pick contact details from my database, create a formatted e-mail/fax
message and send it to outbox. It just adds messages
to the outbox of MS Exchange, doesn't send except first message. Secondlly,
it doesn't re-schedule message, if it is not gone neither it re-dial the fax
no. All you have to do is send them manually one-by-one.
Can any one guide me, so that I will be able to achive desired task.

Thanks in advance.

Aniruddha

2. Exchange 2000 and NT 4.0 Trusts

3. How do I show the permissions tab on Exchange 5.5 User Properties

4. shared folders

5. MAPI_E_NOT_FOUND error with Exchange Event Script

6. Sending fax from WP7 using ms fax

7. Sending an email to multiple contacts using OWA

8. FAX FAX FAX FAX FAX FAX FAX FAX FAX Facts

9. Using Delphi and Exchange

10. Can Exchange be used to send and receive Faxes