emailing
- TimStone
- Posts: 2954
- Joined: Fri Oct 07, 2005 1:45 pm
- Location: Trabuco Canyon, CA USA
- Has thanked: 25 times
- Been thanked: 2 times
- Contact:
Re: emailing
If Outlook is installed, use MAPI. It's the absolute easiest solution.
Code: Select all | Expand
FUNCTION SendMAPIMail2( MailTo, cSndFile, cText, cSubj )
// Send MAPI mail originates email to the MAPI client
// Updated: 8/2/2015 2:16:52 PM
LOCAL oMail
DEFINE MAIL oMail ;
SUBJECT cSubj ;
TEXT cText ;
FILES cSndFile, cSndFile ;
FROM USER ;
TO MailTo
ACTIVATE MAIL oMail
RETURN( .t. )
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Re: emailing
Is it that simple? That code wouldn't compile with my application, but perhaps I need to incorporate the tmail class?
-
- Posts: 85
- Joined: Wed Nov 19, 2014 1:04 pm
- Contact:
Re: emailing
Dear dtussman
you need to #include "mail.ch" in your application.
regards
Yunus.
you need to #include "mail.ch" in your application.
regards
Yunus.
Regards
Yunus
FWH 21.02
Yunus
FWH 21.02
Re: emailing
Now when I try to email it say "there is no default mail client or the current mail client cannot fulfill the messaging request. Please run Outlook and set it as the default mail client". I have already done that however. This is windows 10 and I am using an older version of Harbour from 2007. Wonder if the fact that MapiSendMail has been supposedly replaced by MapiSendMailW has anything to do with it?
Re: emailing
This is the best thing I've found and what I use with xHabour/Fivewin. No other software required, compatible with everything. Just include dll with your install.
https://sockettools.com/sockettools-library-edition/
Randal
https://sockettools.com/sockettools-library-edition/
Randal
- Armando
- Posts: 3271
- Joined: Fri Oct 07, 2005 8:20 pm
- Location: Toluca, México
- Been thanked: 2 times
- Contact:
Re: emailing
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Re: emailing
Thanks Randal and Armando. I will try Sockettools first I think. Randal, do you have any snippets of code you could send me showing how you use it with xharbour/Fivewin? Thanks!
- TimStone
- Posts: 2954
- Joined: Fri Oct 07, 2005 1:45 pm
- Location: Trabuco Canyon, CA USA
- Has thanked: 25 times
- Been thanked: 2 times
- Contact:
Re: emailing
I use the latest FWH. I also have Outlook ( Office 365 ) installed on Windows 10 and it works perfectly. Antonio has provided more recent builds of Harbour for download ( within the past few months ) so upgrading from a 6 year old version might be helpful.
Tim
Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Re: emailing
Tim, I am going to try your suggestion first. I bought the harbor upgrades back in august but never installed them, guess its time to bite the bullet.
Re: emailing
Well, I tried MAPI using FWH 1507 and I got it to work if using MAPISendMail( cSubj, cText, , ,,, .t., ,'dtussman@aol.com' ) . However, I want from user to be set to .f. and when I do that it returns an error code of 2.
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: emailing
My bad, I was thinking you were passing the FROM clause. lFromUser is a flag to determine if you want the user to get a dialog box, and yes, it is supposed to be a logical as you have it. I don't know why passing .f. is generating an error. I may well be, as someone else suggested, that you need to install the upgraded xHarbour also.
James
James
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: emailing
Tim,
David's client is using an SMTP server with TLS security. Can you tell me, is this server automatically installed when you install Outlook (Office 365)?
As I expect you know, FW's email system uses CDO which does not support TSL.
James
I use the latest FWH. I also have Outlook ( Office 365 ) installed on Windows 10 and it works perfectly. Antonio has provided more recent builds of Harbour for download ( within the past few months ) so upgrading from a 6 year old version might be helpful.
David's client is using an SMTP server with TLS security. Can you tell me, is this server automatically installed when you install Outlook (Office 365)?
As I expect you know, FW's email system uses CDO which does not support TSL.
James