GMail send e-mail and attachment(s) code for PB

Just starting out? Need help? Post your questions and find answers here.
rob6523
User
User
Posts: 59
Joined: Sat Sep 25, 2004 2:02 pm
Location: Netherlands (Ophemert)
Contact:

GMail send e-mail and attachment(s) code for PB

Post 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.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: GMail send e-mail and attachment(s) code for PB

Post 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.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: GMail send e-mail and attachment(s) code for PB

Post 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/
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
rob6523
User
User
Posts: 59
Joined: Sat Sep 25, 2004 2:02 pm
Location: Netherlands (Ophemert)
Contact:

Re: GMail send e-mail and attachment(s) code for PB

Post by rob6523 »

Thank you IdeasVacuum and RichAlgeni!

I'll have a look at both your suggestions.

Thanks again.

Rob.
cptdark

Re: GMail send e-mail and attachment(s) code for PB

Post 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.
Last edited by cptdark on Sun Jun 22, 2014 4:06 pm, edited 1 time in total.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: GMail send e-mail and attachment(s) code for PB

Post by IdeasVacuum »

Looks interesting cptdark. 8)
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?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
cptdark

Re: GMail send e-mail and attachment(s) code for PB

Post 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.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: GMail send e-mail and attachment(s) code for PB

Post by IdeasVacuum »

Thanks cptdark. The reason I picked up on the OpenSSL License is because it is not free to use for commercial applications.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
rob6523
User
User
Posts: 59
Joined: Sat Sep 25, 2004 2:02 pm
Location: Netherlands (Ophemert)
Contact:

Re: GMail send e-mail and attachment(s) code for PB

Post by rob6523 »

Thanks cptdark!
I will look at your interesting code!
Post Reply