emailing

emailing

Postby dtussman » Wed Jan 20, 2016 5:23 pm

I have been using CDO for emailing but it is becoming problematic since it doesn't seem to support Outlook. Is there something better I can use for emailing with Harbour?
dtussman
 
Posts: 99
Joined: Sat Jun 06, 2015 6:57 pm

Re: emailing

Postby TimStone » Wed Jan 20, 2016 6:00 pm

If Outlook is installed, use MAPI. It's the absolute easiest solution.

Code: Select all  Expand view  RUN

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
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: emailing

Postby dtussman » Thu Jan 21, 2016 3:44 am

Is it that simple? That code wouldn't compile with my application, but perhaps I need to incorporate the tmail class?
dtussman
 
Posts: 99
Joined: Sat Jun 06, 2015 6:57 pm

Re: emailing

Postby dagiayunus » Thu Jan 21, 2016 1:08 pm

Dear dtussman

you need to #include "mail.ch" in your application.

regards
Yunus.
Regards
Yunus

FWH 21.02
dagiayunus
 
Posts: 85
Joined: Wed Nov 19, 2014 1:04 pm

Re: emailing

Postby dtussman » Thu Jan 21, 2016 5:44 pm

Thank you Yunus, I will try that

David
dtussman
 
Posts: 99
Joined: Sat Jun 06, 2015 6:57 pm

Re: emailing

Postby dtussman » Sat Jan 23, 2016 12:02 am

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?
dtussman
 
Posts: 99
Joined: Sat Jun 06, 2015 6:57 pm

Re: emailing

Postby Randal » Sun Jan 24, 2016 11:25 pm

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
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: emailing

Postby Armando » Mon Jan 25, 2016 12:24 am

Friends:

here is an other option

http://www.afterlogic.com/mailbee/objects

Regards
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
User avatar
Armando
 
Posts: 3242
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: emailing

Postby dtussman » Mon Jan 25, 2016 5:33 pm

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!
dtussman
 
Posts: 99
Joined: Sat Jun 06, 2015 6:57 pm

Re: emailing

Postby TimStone » Mon Jan 25, 2016 5:46 pm

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 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
User avatar
TimStone
 
Posts: 2950
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: emailing

Postby dtussman » Tue Jan 26, 2016 12:55 am

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.
dtussman
 
Posts: 99
Joined: Sat Jun 06, 2015 6:57 pm

Re: emailing

Postby dtussman » Sun Jan 31, 2016 8:07 pm

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.
dtussman
 
Posts: 99
Joined: Sat Jun 06, 2015 6:57 pm

Re: emailing

Postby James Bott » Mon Feb 01, 2016 9:21 pm

FROM USER should either be a string or null.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: emailing

Postby James Bott » Tue Feb 02, 2016 1:49 am

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: emailing

Postby James Bott » Thu Feb 04, 2016 4:19 pm

Tim,

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 13 guests