FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Strange error while quitting application
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Strange error while quitting application
Posted: Fri Dec 05, 2008 12:46 AM

James,

My experience is telling me that the error.log file always is written into the default directory.

Thanks for your messages in this topic.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Strange error while quitting application
Posted: Fri Dec 05, 2008 05:47 PM

Driessen:

The functiion works great. But I have a question.

I have several hundred uers around the world. What are you doing if the user does not use Outlook email?

Thank you

Harvey
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Strange error while quitting application
Posted: Fri Dec 05, 2008 05:52 PM

Harvey,

I suggest that you use the TMail class which uses whatever MAPI client email system the user has--it doesn't have to be Outlook.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Strange error while quitting application
Posted: Fri Dec 05, 2008 07:09 PM

James:

Thanks for the quick response. Could you tak a look at Dreissens code on this thread a let me know how to modify it. Appreciated.

Thank you

Harvey
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Strange error while quitting application
Posted: Fri Dec 05, 2008 07:34 PM

James
In samples there is a file called james.prg regarding emails. Is that yours and does it use the tmail class. I'm a novice at using classes.

Thank you

Harvey
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Strange error while quitting application
Posted: Fri Dec 05, 2008 07:42 PM
MAPI Mail Syntax:

DEFINE MAIL [ <oMail> ];
[ SUBJECT <cSubject> ];
[ TEXT <cText> ];
[ TYPE <cType> ];
[ DATE <dDate> ];
[ TIME <cTime> ];
[ CONVERSATION <cConversation> ]:
[ RECEIPT ];
[ FROM USER ];
[ FILES <cFilename1> ,<cDescript1>, <cFilenameN>, <cDescriptN> ] ];
[ ORIGIN <cOrigin> [ <cOriginAddress> ] ];
[ TO <cTarget1>, [ <cTargetAddress1> ] [ <cTargetN> [ <cTargetAddressN> ] ] ];

FILES
When specifying an attachment file you must include the path and a description. Use a two dimensonal array, the first element is the filename with path, the second is the description. You can have multiple files by adding more elements.

aFiles:={"c:\my docments\mydoc.doc","mydoc.doc"}

If the attachment file is html (has a .htm or .html extension) and you do not specify any TEXT (a message) then the file will appear in the message area.

For Outlook do it this way:

oMail:HTMLBody = ...

ERRORS
If you specify a TO and the parameter is blank and you are using the FROM USER clause, the message compose box will not appear. Likewise if the filename is invalid or not found. It is best to use an error trap:

   DEFINE MAIL...
   ACTIVATE MAIL...

   IF oMail:nRetCode!=0
      MsgAlert("The message could not be sent due to an error."+CRLF+;
      "MAPI error code: "+ltrim(str(oMail:nRetCode)),"Alert")
   ENDIF
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Strange error while quitting application
Posted: Fri Dec 05, 2008 07:46 PM

Thanks for the help I'll give it a try later today.

Thank you

Harvey
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Strange error while quitting application
Posted: Sat Dec 06, 2008 04:34 PM

James
The tmail class worked perfectlt.
Thanks for the help.

Thank you

Harvey

Continue the discussion