FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour problems with email
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

problems with email

Posted: Sat May 10, 2008 05:59 PM

Hi,

I want to open the pre-defined mail program, create a new message and attach a file.

I tried DEFINE MAIL but I does not work fine. In some cases, you have to call it twice, and in some computers it does not work at all!!.

Any ideas?. Thank you, Best regards,

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

problems with email

Posted: Mon May 12, 2008 06:05 PM

DEFINE MAIL works with MAPI. If the computer isn't configured with a default MAPI mail client, then DEFINE MAIL won't work.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

problems with email

Posted: Mon May 12, 2008 07:58 PM

Thank you, James!!

It must be an alternative!!. It is a basic feature that Fivewin must have.

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

problems with email

Posted: Mon May 12, 2008 08:05 PM

There is an alternative. You can use SMTP instead. This will send mail directly to a SMTP server. There are some negatives. Users will not get to edit the mail before it goes out and they will not get a copy saved in their Sent folder in their mail client software.

See FWH\samples\testsmtp.prg

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

problems with email

Posted: Tue May 13, 2008 10:43 AM

Thank you James, it i want to send the email with the email client, so as to avoid the difficulties you have pointed out.

Why does DEFINE MAIL not work fine with Outlook express?.

Best regads

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

problems with email

Posted: Tue May 13, 2008 11:41 AM

DEFINE MAIL does work with Outlook Express.

However, recently I installed the new Outlook Express replacement, Windows Live Mail (desktop) and it reconfigured Windows to make itself the default MAPI client. Then I went back to using Outlook Express and set it to the default MAPI client, but all mail sent to it using another program (such as FW's DEFINE MAIL), still gets sent to Windows Live Mail. I have not been able to find a solution for this. So, DEFINE MAIL still works in this case but it is being sent to the wrong MAPI client--but this is a Windows configuration issue, not a FW issue.

What is the problem you are having with Outlook Express? Are you getting error messages? Perhaps it is a Windows configuration problem. What version of Windows? I am using XP Pro SP2.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

problems with email

Posted: Tue May 13, 2008 12:13 PM

Here is a link on how to fix various MAPI configuration problems.

http://www.ctimls.com/Support/KB/Error% ... _error.htm

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

problems with email

Posted: Wed May 14, 2008 05:34 PM

Hi James,

Thank you for your help!!.

I use Windows XP SP2, Fivewin 7.12 y Harbour 1.1.

This code:

DEFINE MAIL oMail;
SUBJECT "Envío documento";
TEXT "Cordiales saludos" ;
FILES ( cEmailFile ), cFileName( cEmailFile ) ;
FROM USER

ACTIVATE MAIL oMail

In some computers only works when you call it twice. In others, It does not work at all!!!.

What I want is very simple: with the provided file, open a new email meesage. Fivewin should support this!!.

Best regards,

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

problems with email

Posted: Wed May 14, 2008 06:33 PM

Moises,

> What I want is very simple

What you want is not as simple as it seems :-) It should be simple if you have the right settings in your computer.

What email software do you use ? Do have Outlook and Outlook Express both installed in your computer ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

problems with email

Posted: Wed May 14, 2008 08:25 PM

Antonio:

The computer is working fine. No problems when in a web page, for example, yo do click on an email adress. It start it propely.

I have Outlook Express and Outlook. The pre-defined email client is the first.

Thank you!!!. Best regards,

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM

problems with email

Posted: Wed May 14, 2008 08:26 PM
Antonio Linares wrote:Moises,

> What I want is very simple

What you want is not as simple as it seems :-) It should be simple if you have the right settings in your computer.

What email software do you use ? Do have Outlook and Outlook Express both installed in your computer ?

Dear Linares,

Taking your topic, let me ask something:

I have a similar routine that works perfectly when the default program is Outlook Express, but when it's defined for Mozilla Thunderbird ... the routine only opens the program, but not the screen for sending e-mail like in Outlook.

Is there any extra configuration to do?
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

problems with email

Posted: Wed May 14, 2008 10:28 PM

Moises,

>In some computers only works when you call it twice. In others, It does not work at all!!!.

>What I want is very simple: with the provided file, open a new email meesage. Fivewin should support this!!.

I don't think this has anything to do with FW. FW does support MAPI and I have been using it for many years without problem.

You are having a MAPI configuration problem. Did you look at the link I provided above?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

problems with email

Posted: Sun May 18, 2008 07:48 PM

Hi,

I found an alternative, the mailto: command. It starts the pre-defined mail client, but i don´t know how to specify a file to attach.

Anyone has more info about this command?. Thank you

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

problems with email

Posted: Sun May 18, 2008 07:54 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM

problems with email

Posted: Mon May 19, 2008 07:35 AM

Antonio,

Of course, I tried Google first, but those pages refer to UNIX, not to Windows and I did´t find a working example to attach a file with mailto: command. Where I can find its parameters?.

Thank you

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40