Re: [Lazarus] még egy próba

2018-05-10 Thread Kovács László via Lazarus

Hi,
Sorry for that.
Setting up and testing mailman based list, mistyped the list address. 
(Actually acctepted the wrong suggestion from TB)



Regards
K.L.

2018-05-11 07:37 keltezéssel, Kovács László via Lazarus írta:

újabb teszt


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] még egy próba

2018-05-10 Thread Kovács László via Lazarus

újabb teszt
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to use two different versions of FPC

2018-05-10 Thread Thierry B. via Lazarus

Le 10/05/2018 à 14:31, Joost van der Sluis via Lazarus a écrit :

Op 10-05-18 om 14:05 schreef Giuliano Colla via Lazarus:

Il 09/05/2018 12:34, Joost van der Sluis via Lazarus ha scritto:

That's more a hack then a solution


I fail to grasp why startlazarus should be a feature, and fpc.sh 
should be a hack.


Startlazarus is also a hack, because on Windows you can not overwrite an 
executable which is open and the design is kept consistent between OS'es.


You can perfectly fine use just 'lazarus' on Linux, I never use 
'startlazarus'.


Having multiple fpc.cfg files, as it may be required by multiple fpc 
installations requires invoking the compiler with the appropriate 
parameters. A script is just the most comfortable way to achieve this 
result.




Here is the script I use since several years, that maintain  2 or 3 
freepascal/lazarus sets and cross compile from linux to win32 (i don't 
need more).
I didn't wrote it, guess I grabbed it from "buildfaq" documentation and 
added modified it thereafter. I have to removed hard coded paths inside 
but since  I had not changes setup for 10 years, it works! And only one 
~/.fpc.cfg


https://pastebin.com/eMsq5JLD

TB

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to use two different versions of FPC

2018-05-10 Thread patspiper via Lazarus

On 07/05/18 17:54, Gabor Boros via Lazarus wrote:
My main development toolset is FPC 3.0.4 and Lazarus fixes_1_8. 
Sometimes I try some things with Lazarus trunk also. It is easy.
But now build up a new development machine from scratch with RHEL 7.5 
on it and try to utilize FPC trunk too (with Lazarus trunk). I use 
"--primary-config-path" option always, so Lazarus config placement is 
not a problem. But the two FPC versions coexist. I found a solution 
from 2012 on the forum (see the link below). Is BigChimp's suggestion 
(1.-6.) a good starting point nowadays or something changed meanwhile 
in this topic. I will build everything (Lazarus fixes_1_8 and trunk, 
FPC trunk) from source except the actual stable FPC (now 3.0.4).

Attached snapshot is work in progress

Stephano

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Sending e-mail from within Lazarus

2018-05-10 Thread Alonso Cárdenas Márquez via Lazarus
2018-05-10 8:31 GMT-05:00 Brian via Lazarus :

> Does anybody have a working example of sending e-mail from a Lazarus
> program through their ISP's mail server (which requires SSL/TLS) that
> they'd be willing to share with me? I've been trying to follow
> Michael's writeup for using Synapse,  I'm getting a timeout error from
> deep within the Synapse code, and I don't know whether it's something
> that I've screwed up or some kind of incompatibility with the mail
> server - my ISP, of course, will only tell me to use Outlook or
> similar. :( If I try to step through with the debugger, I get a socket
> error of 110. The version of Synapse I'm using is (I think) 40.1, at
> least it's the version downloaded via the online package manager.
>
> I'm using Lazarus 1.8.2 and FPC 3.0.4 as downloaded from SourceForge.
>
> Thanks.
>
> --
>

Hi Brian

Try with the following:

https://github.com/silvioprog/brookframework/tree/master/plugins/xmailer

It is a great plugin for send email developed by Silvio. I use it to
sending emails from different hosts with SSL/TLS. It uses synapse (Look at
demo folder). Don't forget check if email ports are open for you by your
ISP. You just need smtp ports (25, 587) to sending emails.

Greetings
ACM
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Sending e-mail from within Lazarus

2018-05-10 Thread Graeme Geldenhuys via Lazarus
On 2018-05-10 14:31, Brian via Lazarus wrote:
> Does anybody have a working example of sending e-mail from a Lazarus
> program through their ISP's mail server (which requires SSL/TLS) that

I've been doing that for years, and have always used Indy components
since my Delphi 4 days. Indy also has a ton of working examples, very
simple to use components, and the support is fantastic (just like FPC
and Lazarus). The extra good news is that there are tons of examples and
solutions available with a quick internet search - even if those
solutions are for Delphi, they apply exactly the same for FPC/Lazarus.

The latest Indy code can be found here:

  https://svn.atozed.com:444/svn/Indy10/trunk

ps:
  You don't have to install the Indy components into Lazarus, you can
  use them via code only without problems. That's what I do. Simply set
  your search paths, or compile the runtime lazarus packages and
  associate the indy package as a dependency of your project.

A internet search _will_ give you your answer, but if you really are
stuck, I have working example code I can share. My programs can sent
emails via Gmail, Yahoo, Office365 or any other ISP.

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Sending e-mail from within Lazarus

2018-05-10 Thread Denis Kozlov via Lazarus


Try the latest trunk version of Synapse code:
http://sourceforge.net/p/synalist/code/HEAD/tree/trunk/

You'll also need OpenSSL binaries:
https://wiki.openssl.org/index.php/Binaries

Here is a snippet of a working connection routine, although tested in 
Delphi only:




uses
  // "ssl_openssl" unit is required to use SSL / TLS
  mimemess, mimepart, synachar, ssl_openssl;

type
  TMailerSecurity = (
    msNONE,
    msSTARTTLS,
    msSSLTLS
  );

procedure TMailer.Connect(const AHost: String; APort: Integer;
  ASecurity: TMailerSecurity; AAuthenticate: Boolean;
  const AUsername, APassword: String);
begin
  SMTP := TSMTPSend.Create;

  if AAuthenticate then
  begin
    SMTP.UserName := AUsername;
    SMTP.Password := APassword;
  end;
  SMTP.TargetHost := AHost;
  SMTP.TargetPort := IntToStr(APort);
  SMTP.AutoTLS := (ASecurity = msSTARTTLS);
  SMTP.FullSSL := (ASecurity = msSSLTLS);
  SMTP.Timeout := 1; // 10 seconds

  if not SMTP.Login then
    raise EMailer.CreateSMTP('SMTP.Login', SMTP);

  if AAuthenticate then
    if not SMTP.AuthDone then
  raise EMailer.Create(sMailerNotAuthenticated);
end;



Regards,
Denis


On 10/05/2018 14:31, Brian via Lazarus wrote:

Does anybody have a working example of sending e-mail from a Lazarus
program through their ISP's mail server (which requires SSL/TLS) that
they'd be willing to share with me? I've been trying to follow
Michael's writeup for using Synapse,  I'm getting a timeout error from
deep within the Synapse code, and I don't know whether it's something
that I've screwed up or some kind of incompatibility with the mail
server - my ISP, of course, will only tell me to use Outlook or
similar. :( If I try to step through with the debugger, I get a socket
error of 110. The version of Synapse I'm using is (I think) 40.1, at
least it's the version downloaded via the online package manager.

I'm using Lazarus 1.8.2 and FPC 3.0.4 as downloaded from SourceForge.

Thanks.



--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Sending e-mail from within Lazarus

2018-05-10 Thread Brian via Lazarus
On 05/10/2018 09:42 AM, Carlos E. R. via Lazarus wrote:
> On 2018-05-10 15:31, Brian via Lazarus wrote:
>> Does anybody have a working example of sending e-mail from a Lazarus
>> program through their ISP's mail server (which requires SSL/TLS) that
>> they'd be willing to share with me?
> 
> I intend to code this soon, but I will simply call "mailx", an external
> program to do it. The classic method was to call the sendmail binary.
> 
> I use Linux, you did not say what you use.
> 

Ugh, sorry. 64-bit Ubuntu Studio 16, LTS.



-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to use two different versions of FPC

2018-05-10 Thread patspiper via Lazarus

On 07/05/18 17:54, Gabor Boros via Lazarus wrote:
My main development toolset is FPC 3.0.4 and Lazarus fixes_1_8. 
Sometimes I try some things with Lazarus trunk also. It is easy.
But now build up a new development machine from scratch with RHEL 7.5 
on it and try to utilize FPC trunk too (with Lazarus trunk). I use 
"--primary-config-path" option always, so Lazarus config placement is 
not a problem. But the two FPC versions coexist. I found a solution 
from 2012 on the forum (see the link below). Is BigChimp's suggestion 
(1.-6.) a good starting point nowadays or something changed meanwhile 
in this topic. I will build everything (Lazarus fixes_1_8 and trunk, 
FPC trunk) from source except the actual stable FPC (now 3.0.4).


Attached snapshot is work in progress

Stephano
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Sending e-mail from within Lazarus

2018-05-10 Thread hdv@gmail via Lazarus
On 2018-05-10 15:42, Carlos E. R. via Lazarus wrote:
> On 2018-05-10 15:31, Brian via Lazarus wrote:
>> Does anybody have a working example of sending e-mail from a Lazarus
>> program through their ISP's mail server (which requires SSL/TLS) that
>> they'd be willing to share with me?
> 
> I intend to code this soon, but I will simply call "mailx", an external
> program to do it. The classic method was to call the sendmail binary.
> 
> I use Linux, you did not say what you use.

In addition to Carlos' suggestion, and if you use Windows, you could use Blat
[1] or even Powershell [2] to do this. It will not be "native", but it works.

I used to use perl (I have been completely addicted to it for non-GUI stuff for
decades now) or "The Bat!" in the past for this, but I don't know if "The Bat"
still exists.

[1] https://sourceforge.net/projects/blat/

[2]
https://www.howtogeek.com/120011/stupid-geek-tricks-how-to-send-email-from-the-command-line-in-windows-without-extra-software/

Grx HdV
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Sending e-mail from within Lazarus

2018-05-10 Thread Carlos E. R. via Lazarus
On 2018-05-10 15:31, Brian via Lazarus wrote:
> Does anybody have a working example of sending e-mail from a Lazarus
> program through their ISP's mail server (which requires SSL/TLS) that
> they'd be willing to share with me?

I intend to code this soon, but I will simply call "mailx", an external
program to do it. The classic method was to call the sendmail binary.

I use Linux, you did not say what you use.

-- 
Cheers / Saludos,

Carlos E. R.
(from 42.3 x86_64 "Malachite" at Telcontar)



signature.asc
Description: OpenPGP digital signature
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Sending e-mail from within Lazarus

2018-05-10 Thread Brian via Lazarus
Does anybody have a working example of sending e-mail from a Lazarus
program through their ISP's mail server (which requires SSL/TLS) that
they'd be willing to share with me? I've been trying to follow
Michael's writeup for using Synapse,  I'm getting a timeout error from
deep within the Synapse code, and I don't know whether it's something
that I've screwed up or some kind of incompatibility with the mail
server - my ISP, of course, will only tell me to use Outlook or
similar. :( If I try to step through with the debugger, I get a socket
error of 110. The version of Synapse I'm using is (I think) 40.1, at
least it's the version downloaded via the online package manager.

I'm using Lazarus 1.8.2 and FPC 3.0.4 as downloaded from SourceForge.

Thanks.

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to use two different versions of FPC

2018-05-10 Thread Michael Van Canneyt via Lazarus



On Thu, 10 May 2018, Joost van der Sluis via Lazarus wrote:



Oh, you may do so. But it is unnecessary and confusing in the fpc-case. 
Off-course you can configure Lazarus to use fpc.sh. But what do you do 
in a terminal? Wouldn't it be easier to just call 'fpc_304' and 
'fpc_trunk'? Or /path/to/compiler/versiona/fpc and 
/path/to/compiler/versionb/fpc?


Believe me when I say that most fpc-developers have really difficult 
setups, which a lot of different versions of fpc installed. And they do 
not use scripts like fpcup. They also don't type magically looking 
command lines. They use just the features already build into the compiler.


Indeed. I have 13 versions installed, dating back to version 2.0.0
No tricks needed.

Michael.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to use two different versions of FPC

2018-05-10 Thread Giuliano Colla via Lazarus

Il 09/05/2018 12:34, Joost van der Sluis via Lazarus ha scritto:

That's more a hack then a solution


I fail to grasp why startlazarus should be a feature, and fpc.sh should 
be a hack.


Having multiple fpc.cfg files, as it may be required by multiple fpc 
installations requires invoking the compiler with the appropriate 
parameters. A script is just the most comfortable way to achieve this 
result.


Launching an executable via another program or a script which sets up 
the appropriate environment according the user needs is a standard well 
established practice, since the dawn of Unix.


Giuliano


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] How to use two different versions of FPC

2018-05-10 Thread Alfred via Lazarus


That's more a hack then a solution, and the real solution is simple and 
also works outside Lazarus: place the fpc.cfg in ~/experiments/etc, 
~/development/etc etc, as already suggested by Ingo. Or, even better, 
just alongside the compiler-executable. You can call 'fpc -va' to check 
which configuration file is used.



Fpcup(deluxe) uses the fpc.sh - hack to prevent fpc from picking up a 
config that has not been generated by fpcup itself !

That is why the -n switch is used, in combination with @.
Fpcup(deluxe) wants the FPC/Lazarus install to isolate itself in all 
cases.


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus