// Spielt einen Sound bei eingehender E-Mail
// Danke an Colin

Program OnEmailChecked;

Function PlaySound( Filename: PChar; Options: LongWord ): Boolean;
external 'sndPlaySoundA@winmm.dll stdcall';

Procedure OnEmailChecked(Identity:string; FetchedCount, TotalOnServerBefore, TotalOnServerAfter: integer);
Begin
    //If mail then play wav
    if fetchedcount=0 then exit;

    // modify the path and filename to your favourite .wav file
    PlaySound( 'c:\Internet\Dialog\mail.wav', 1 );
End;

Begin
End.