Page 1 of 1
GMail send e-mail and attachment(s) code for PB
Posted: Wed Oct 23, 2013 9:15 am
by rob6523
Does anyone have working code to send e-mail and attachment(s) using a GMail account for PB 5.20 or has anyone seen some?
Thanks, Rob.
Re: GMail send e-mail and attachment(s) code for PB
Posted: Wed Oct 23, 2013 8:09 pm
by RichAlgeni
http://www.purebasic.fr/english/viewtop ... =5&t=52462: 32 bit.
http://www.purebasic.fr/english/viewtop ... =5&t=52463: 64 bit.
This will get you started, then search for 'smtp attachments.'
Post your code when complete. I didn't have the need to add attachments, since I only use it to send alerts.
Re: GMail send e-mail and attachment(s) code for PB
Posted: Wed Oct 23, 2013 9:15 pm
by IdeasVacuum
....to use Unicode you will need to compile the C code provided by RichAlgeni.
However, if your app is going to be commercial, there is a major snag - the original lib is huge, not just for email. The license cost/terms might be prohibitive. The price is unknown because it's based on their evaluation of your application. I think that potentially makes the ActiveExperts lib a better bet, because their prices are published and they sell SSL/TLS functionality as an individual lib with specific email functionality.
http://www.activexperts.com/smtp-pop3-component/
Re: GMail send e-mail and attachment(s) code for PB
Posted: Fri Oct 25, 2013 9:07 am
by rob6523
Thank you IdeasVacuum and RichAlgeni!
I'll have a look at both your suggestions.
Thanks again.
Rob.
Re: GMail send e-mail and attachment(s) code for PB
Posted: Sun Oct 27, 2013 11:33 am
by cptdark
Hi
Also have a look at my AWPB-Includes in the german forum
http://forums.purebasic.com/german/view ... =8&t=23313, download at
http://www.planet-rk.de
I've written some code to send and receive mails (POP3/SMTP) also using OpenSSL.
It's not fully tested yet, but it could be of some help for you.
Re: GMail send e-mail and attachment(s) code for PB
Posted: Sun Oct 27, 2013 3:27 pm
by IdeasVacuum
Looks interesting cptdark.
In the header of awopenssl.pbi:
Code: Select all
; AWPB-Tools is free software: you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
Which is fine, but there is no mention of the License to use OpenSSL?
Re: GMail send e-mail and attachment(s) code for PB
Posted: Mon Oct 28, 2013 9:46 am
by cptdark
OK, thanks for the info. Since these includes are work-in-progress, some things are still missing. I've integrated OpenSSL license into this include, though it's just an interface it should only be needed for the product which uses it. Sometimes it is not as easy to handle all these different licenses
Anyway, I would appreciate it, if you could report success or problems you have if you use them.
Re: GMail send e-mail and attachment(s) code for PB
Posted: Mon Oct 28, 2013 10:08 am
by IdeasVacuum
Thanks cptdark. The reason I picked up on the OpenSSL License is because it is not free to use for commercial applications.
Re: GMail send e-mail and attachment(s) code for PB
Posted: Tue Oct 29, 2013 8:20 pm
by rob6523
Thanks cptdark!
I will look at your interesting code!