Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-03

How to send Email from Lazarus program under Linux x86-64

14 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Donald Ziesig

Hi All!

I am trying to implement a program that will send emails to (a subset of) an application-specific roster.

I found numerous references to synapse so I downloaded the source which includes a .lpk library (it is several years old). When I tried to compile it under Lazarus 1.1, fpc 2.6.2, the compiler could not find a method called inet_addr. I searched the synapse source code and it showed numerous references to inet_addr, but no place where it was defined for fpc. I hacked the code so it used linux rather than fpc and it failed while looking for unit libc, before ever getting to the inet_addr declaration. I looked for libc and found that it is obsolete and does not seem to be available for 64-bit systems anyway.

Has anyone had success in using this library under Linux (x86-64)?

I also examined Indy (which I used successfully years ago on Delphi/Borland c++ Builder) but it, too, is obsolete (latest updates seem to be circa 2006) and comes with many, many warnings and caveats.

I found Mailpas (also from 2006) but I am having problems compiling the library -- it says it can't find a file which really is there where it is supposed to be. -- During the long mailing list shutdown I found that the compiler message about a non-existent include file was wrong. The actual failure was that the include file "uses libc" which does not exist on my system (same problem as with synapse). I'll submit a bug report as soon as I can.

Is there any other smtp and pop3 code available for Lazarus or will I have to generate my own from scratch?

Thanks,

Don Ziesig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130324/8b6a821d/attachment.html>

Unknown author
to Donald Ziesig
Donald Ziesig wrote 7 lines
Hi All! I am trying to implement a program that will send emails to (a subset of) an application-specific roster. I found numerous references to synapse so I downloaded the source which includes a .lpk library (it is several years old).

Yep, seems about 3 years old:
cd C:\Development\extras\synapse
svn log laz_synapse.lpk | more
r129 | geby | 2010-07-02 12:46:39 +0200 (vr, 02 jul 2010) | 3 lines

- improved MACOS compatibility
- workaround for some broken virtual serial ports
- Added Lazarus package

Has anyone had success in using this library under Linux (x86-64)?

Yes. See e.g. fpctwit, which happily runs under Linux. Also, the fpcup Lazarus/fpc updater can install synapse for you, also the synapse trunk version.

AFAIK no need to change any synapse files.

Please see the wiki page on synapse:
http://wiki.lazarus.freepascal.org/synapse

I also examined Indy (which I used successfully years ago on Delphi/Borland c++ Builder) but it, too, is obsolete (latest updates seem to be circa 2006) and comes with many, many warnings and caveats.

Please see the indy wiki page:
... ah well, you'll be able to find it. It's cross referenced in the synapse page as well IIRC.

Is there any other smtp and pop3 code available for Lazarus or will I have to generate my own from scratch?

There certainly is. IIRC, LazSolutions has code for sending email. Synapse comes with an email example, or has it in the examples directory on their site.
Code for sending email using synapse is floating around on e.g. the synapse mailing list...

Good luck,
Reinier

silvioprog
to Unknown author

2013/3/24

Show quoted text 47 lines
On 24-3-2013 15:19, Donald Ziesig wrote: > Hi All! > > I am trying to implement a program that will send emails to (a subset > of) an application-specific roster. > > I found numerous references to synapse so I downloaded the source which > includes a .lpk library (it is several years old). Yep, seems about 3 years old: cd C:\Development\extras\synapse svn log laz_synapse.lpk | more r129 | geby | 2010-07-02 12:46:39 +0200 (vr, 02 jul 2010) | 3 lines - improved MACOS compatibility - workaround for some broken virtual serial ports - Added Lazarus package > Has anyone had success in using this library under Linux (x86-64)? Yes. See e.g. fpctwit, which happily runs under Linux. Also, the fpcup Lazarus/fpc updater can install synapse for you, also the synapse trunk version. AFAIK no need to change any synapse files. Please see the wiki page on synapse: http://wiki.lazarus.freepascal.org/synapse > I also examined Indy (which I used successfully years ago on > Delphi/Borland c++ Builder) but it, too, is obsolete (latest updates > seem to be circa 2006) and comes with many, many warnings and caveats. Please see the indy wiki page: ... ah well, you'll be able to find it. It's cross referenced in the synapse page as well IIRC. > Is there any other smtp and pop3 code available for Lazarus or will I > have to generate my own from scratch? There certainly is. IIRC, LazSolutions has code for sending email. Synapse comes with an email example, or has it in the examples directory on their site. Code for sending email using synapse is floating around on e.g. the synapse mailing list... Good luck, Reinier

Thanks for the indication Reinier! :)

Meet the XMailer also:

https://github.com/silvioprog/xmailer

XMailer is a nice plugin for send e-mails easily. It's improved derivation of LSSendMail. :) (it use Synapse too, and offers support to UTF-8)

Silvio Cl?cio My public projects - github.com/silvioprog -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130324/503d50d5/attachment.html>
Paul Breneman
to silvioprog
silvioprog wrote 56 lines
2013/3/24 > On 24-3-2013 15:19, Donald Ziesig wrote: >> Hi All! >> >> I am trying to implement a program that will send emails to (a subset >> of) an application-specific roster. >> >> I found numerous references to synapse so I downloaded the source which >> includes a .lpk library (it is several years old). > Yep, seems about 3 years old: > cd C:\Development\extras\synapse > svn log laz_synapse.lpk | more > r129 | geby | 2010-07-02 12:46:39 +0200 (vr, 02 jul 2010) | 3 lines > > - improved MACOS compatibility > - workaround for some broken virtual serial ports > - Added Lazarus package > >> Has anyone had success in using this library under Linux (x86-64)? > Yes. See e.g. fpctwit, which happily runs under Linux. Also, the fpcup > Lazarus/fpc updater can install synapse for you, also the synapse trunk > version. > > AFAIK no need to change any synapse files. > > Please see the wiki page on synapse: > http://wiki.lazarus.freepascal.org/synapse > >> I also examined Indy (which I used successfully years ago on >> Delphi/Borland c++ Builder) but it, too, is obsolete (latest updates >> seem to be circa 2006) and comes with many, many warnings and caveats. > Please see the indy wiki page: > ... ah well, you'll be able to find it. It's cross referenced in the > synapse page as well IIRC. > >> Is there any other smtp and pop3 code available for Lazarus or will I >> have to generate my own from scratch? > There certainly is. IIRC, LazSolutions has code for sending email. > Synapse comes with an email example, or has it in the examples directory > on their site. > Code for sending email using synapse is floating around on e.g. the > synapse mailing list... > > Good luck, > Reinier Thanks for the indication Reinier! :) Meet the XMailer also: https://github.com/silvioprog/xmailer XMailer is a nice plugin for send e-mails easily. It's improved derivation of LSSendMail. :) (it use Synapse too, and offers support to UTF-8)

Thanks Silvio. Now I need to try and update this code: http://www.turbocontrol.com/easyemail.htm

silvioprog
to Paul Breneman

2013/3/24 Paul Breneman

Show quoted text 68 lines
silvioprog wrote: > 2013/3/24 > > On 24-3-2013 15:19, Donald Ziesig wrote: >> >>> Hi All! >>> >>> I am trying to implement a program that will send emails to (a subset >>> of) an application-specific roster. >>> >>> I found numerous references to synapse so I downloaded the source which >>> includes a .lpk library (it is several years old). >>> >> Yep, seems about 3 years old: >> cd C:\Development\extras\synapse >> svn log laz_synapse.lpk | more >> r129 | geby | 2010-07-02 12:46:39 +0200 (vr, 02 jul 2010) | 3 lines >> >> - improved MACOS compatibility >> - workaround for some broken virtual serial ports >> - Added Lazarus package >> >> Has anyone had success in using this library under Linux (x86-64)? >>> >> Yes. See e.g. fpctwit, which happily runs under Linux. Also, the fpcup >> Lazarus/fpc updater can install synapse for you, also the synapse trunk >> version. >> >> AFAIK no need to change any synapse files. >> >> Please see the wiki page on synapse: >> http://wiki.lazarus.**freepascal.org/synapse<http://wiki.lazarus.freepascal.org/synapse> >> >> I also examined Indy (which I used successfully years ago on >>> Delphi/Borland c++ Builder) but it, too, is obsolete (latest updates >>> seem to be circa 2006) and comes with many, many warnings and caveats. >>> >> Please see the indy wiki page: >> ... ah well, you'll be able to find it. It's cross referenced in the >> synapse page as well IIRC. >> >> Is there any other smtp and pop3 code available for Lazarus or will I >>> have to generate my own from scratch? >>> >> There certainly is. IIRC, LazSolutions has code for sending email. >> Synapse comes with an email example, or has it in the examples directory >> on their site. >> Code for sending email using synapse is floating around on e.g. the >> synapse mailing list... >> >> Good luck, >> Reinier >> > > > Thanks for the indication Reinier! :) > > Meet the XMailer also: > > https://github.com/silvioprog/**xmailer<https://github.com/silvioprog/xmailer> > > XMailer is a nice plugin for send e-mails easily. It's improved derivation > of LSSendMail. :) (it use Synapse too, and offers support to UTF-8) > Thanks Silvio. Now I need to try and update this code: http://www.turbocontrol.com/**easyemail.htm<http://www.turbocontrol.com/easyemail.htm>

Very nice! :)

XMailer is very simple, and it uses universal unicode. Sending email with XMailer you can open it in any account such as Gmail, Yahoo, Hotmail etc., even if the email has special characters.

Silvio Cl?cio My public projects - github.com/silvioprog -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130324/ea53ee83/attachment-0001.html>
Graeme Geldenhuys
to Unknown author: Yep, seems about 3 years old: cd C:\Development\extras\synapse svn log laz_synapse.lpk |…
Show quoted text 5 lines
Yep, seems about 3 years old: cd C:\Development\extras\synapse svn log laz_synapse.lpk | more r129 | geby | 2010-07-02 12:46:39 +0200 (vr, 02 jul 2010) | 3 lines

Uh???

http://synalist.svn.sourceforge.net/viewvc/synalist/

Last modified 2 weeks ago.

@Donald,
I use Synapse in our commercial products to send emails. It was very simple to use and we also use FPC 2.6.2 under FreeBSD, Linux and Widows.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/
Graeme Geldenhuys
to Reinier Olislagers
Reinier Olislagers wrote 5 lines

You are going to kick yourself soon... What you posted is the history of a single file 'laz_synapse.lpk' (sitting at r129), not the history of the whole Synapse project (latest revision is r182). The *.lpk files hardly ever change once they are setup, but the other code units DO change.

The latest Synapse code was modified 2 weeks ago, and that is what my link showed.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/
Reinier Olislagers
to Graeme Geldenhuys
Graeme Geldenhuys wrote 15 lines
On 2013-03-25 09:40, Reinier Olislagers wrote: > > No: > http://synalist.svn.sourceforge.net/viewvc/synalist/trunk/laz_synapse.lpk?view=log > > 2 years, 8 months. You are going to kick yourself soon... What you posted is the history of a single file 'laz_synapse.lpk' (sitting at r129), not the history of the whole Synapse project (latest revision is r182). The *.lpk files hardly ever change once they are setup, but the other code units DO change. The latest Synapse code was modified 2 weeks ago, and that is what my link showed.

More Graeme,

If you care to actually *read* what Donald and I posted - I think you're going to kick yourself.

Can we stop now ;)

Donald Ziesig wrote 7 lines
Hi All! I am trying to implement a program that will send emails to (a subset of) an application-specific roster. I found numerous references to synapse so I downloaded the source which includes a .lpk library (it is several years old).

Yep, seems about 3 years old:
cd C:\Development\extras\synapse
svn log laz_synapse.lpk | more
r129 | geby | 2010-07-02 12:46:39 +0200 (vr, 02 jul 2010) | 3 lines

Graeme Geldenhuys
to Reinier Olislagers
Reinier Olislagers wrote
If you care to actually *read* what Donald and I posted - I think you're going to kick yourself.

"I found numerous references to synapse so I downloaded the source which includes a .lpk library (it is several years old)." -- Donald

I interpreted that as, he considers the Synapse "package" (collection of code units - commonly referred to as package or library) being several years old. The "package" or "library" not having had changes in several years.

Well, I just confirmed that that is NOT true, and Synapse has seen modifications as recent as 2 weeks ago. I also just emailed the author with more patches for FreeBSD support (which I forgot to do months ago).

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/
Reinier Olislagers
to Graeme Geldenhuys
Graeme Geldenhuys wrote
I interpreted that as, he considers the Synapse "package" (collection of code units - commonly referred to as package or library) being several years old. The "package" or "library" not having had changes in several years.

You don't say.

Donald Ziesig
to Reinier Olislagers: No: http://synalist.svn.sourceforge.net/viewvc/synalist/trunk/laz_synapse.lpk?view=log 2…

Just a word of thanks to all who helped me with this. Somehow I kept getting really old code from all of the links and none of it would compile in 64-bit mode, let alone run.

I finally found the synapse svn website which had a massive tarball with almost everything from the beginning to really up-to-date code. The latest code compiled and started sending email immediately.

Again, thanks to all who recognized that I was not getting the latest and pointed me in the right direction.

Don Ziesig

END OF THREAD!

Alejandro Gonzalo
to Donald Ziesig

What about webmail like Gmail?? Anyway to use openurl to go to the webpage with the To, Subject, and perhaps Body already filled in? ?
A. G.

________________________________

Earlier message 17 lines
From: Donald Ziesig To: Sent: Tuesday, March 26, 2013 11:27 AM Subject: Re: [Lazarus] How to send Email from Lazarus program under Linux x86-64 Just a word of thanks to all who helped me with this.? Somehow I kept getting really old code from all of the links and none of it would compile in 64-bit mode, let alone run. I finally found the synapse svn website which had a massive tarball with almost everything from the beginning to really up-to-date code.? The latest code compiled and started sending email immediately. Again, thanks to all who recognized that I was not getting the latest and pointed me in the right direction. Don Ziesig END OF THREAD! --