Page 3 of 4
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Mon Sep 30, 2013 11:14 pm
by MC2015
@TS-Soft: You started this thread and you`re a great coder....do you use your code?
There are some changes made by some other users....
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Mon Dec 09, 2013 11:34 am
by dige
It seems there is something missing. Something like a datetimeformat declare.
For example using this date: 1. December 2013 -> 01/12/2013
Code: Select all
__SM_SendAndProt("Date:" + FormatDate("%dd/%mm/%yyyy @ %hh:%ii:%ss", Date()))
Result:
Outlook: 1. December 2013
Thunderbird: 12. Januar 2013
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Fri Dec 13, 2013 8:42 pm
by dige
Code: Select all
Procedure.s __SendMail_GetFormatedDate(date.i)
Protected Result.s
; DateTime Format RFC 5322
; Date: Mon, 4 Dec 2006 15:51:37 +0100
Select DayOfWeek(date)
Case 0 : Result = "Sun"
Case 1 : Result = "Mon"
Case 2 : Result = "Tue"
Case 3 : Result = "Wed"
Case 4 : Result = "Thu"
Case 5 : Result = "Fri"
Case 6 : Result = "Sat"
EndSelect
Result + ", " + FormatDate("%dd", date) + " "
Select Month(date)
Case 1 : Result + "Jan"
Case 2 : Result + "Feb"
Case 3 : Result + "Mar"
Case 4 : Result + "Apr"
Case 5 : Result + "May"
Case 6 : Result + "Jun"
Case 7 : Result + "Jul"
Case 8 : Result + "Aug"
Case 9 : Result + "Sep"
Case 10: Result + "Oct"
Case 11: Result + "Nov"
Case 12: Result + "Dec"
EndSelect
Result + " " + FormatDate("%yyyy %hh:%ii:%ss", date) + " +0100"
ProcedureReturn Result
EndProcedure
And change the date line like this:
Code: Select all
; __SM_SendAndProt("Date:" + FormatDate("%dd/%mm/%yyyy @ %hh:%ii:%ss", Date()))
__SM_SendAndProt("Date:" + __SendMail_GetFormatedDate(Date()))
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Thu Sep 18, 2014 3:05 pm
by Liqu
this code is great,
i still hope it support gmail

do you have a free smtp server recommendation?
thank you very much
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Thu Sep 18, 2014 3:21 pm
by IdeasVacuum
To support gmail and similar requires TLS and SSL security - there are libs out there, but for commercial use a lot of money is involved.
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Thu Sep 18, 2014 3:35 pm
by ts-soft
SMTP AUTH available in PB 5.10, so i think, this include is more or less obsolete
No gmail support!
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Thu Sep 18, 2014 3:45 pm
by Liqu
IdeasVacuum wrote:To support gmail and similar requires TLS and SSL security - there are libs out there, but for commercial use a lot of money is involved.
how about using RichAgeni's code for TLS and SSL
http://www.purebasic.fr/english/viewtop ... =5&t=52462
RichAgeni's code is great too but no attachments
for commercial use, we don't provide the dll, user must download the dll by himself/herself, so we don't need to pay the license right?
--
and when i tried to use this code to SMTP2GO.com, it failed with error :
[ ERR >Extension 'AUTH LOGIN' not supported - Quit< ]
@ts-soft
would you please try the PB SMTP AUTH to SMTP2GO.com's SMTP please?
i tried it but the pb hang? no timeout?
thank you very much
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Thu Sep 18, 2014 4:34 pm
by IdeasVacuum
for commercial use, we don't provide the dll, user must download the dll by himself/herself, so we don't need to pay the license right?
That might be a way round it, but how many customers will like that idea is another thing. Rich's code uses the cryptlib security toolkit library, which is not free for commercial use either. It also does not support Unicode (gmail is Unicode).
The best in terms of price, but also looking easy to use, is ActiveExperts SendEMail. 600 euros for a distribution license.
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Thu Sep 18, 2014 6:05 pm
by Liqu
IdeasVacuum wrote:for commercial use, we don't provide the dll, user must download the dll by himself/herself, so we don't need to pay the license right?
That might be a way round it, but how many customers will like that idea is another thing. Rich's code uses the cryptlib security toolkit library, which is not free for commercial use either. It also does not support Unicode (gmail is Unicode).
The best in terms of price, but also looking easy to use, is ActiveExperts SendEMail. 600 euros for a distribution license.
thank you for your suggestion,
is there a PB Code for ActiveExperts SendEMail Lib?
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Thu Sep 18, 2014 8:17 pm
by IdeasVacuum
You can ask them that question. There are sample codes in many languages, so even if the answer is no, it should be easy to do.
http://www.activexperts.com/activexperts/contact/
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Fri Sep 19, 2014 6:45 am
by Liqu
Fortunately, i just got a small cmd program to send email to GMAIL, it support SSL/TLS and it's free
I tested it in W7 x64 and it works but i doesn't work on Fresh Installed XP ( they said it need .NET Framework )
[
http://commandlinesendmail.blogspot.com/ ]
Download :
http://www.atay.org/downloads/senditquiet.zip
they also post the source code at github :
https://github.com/atays/command-line-e ... nding-tool
Download :
https://github.com/atays/command-line-e ... -pages.zip
Edited : It seems it use .NET's SSL ...
Thank you
----------------
Edited again :
i don't know why, but the pb mail system works with smtpcorp.com now hahaha, my bad
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Fri Sep 19, 2014 11:17 am
by IdeasVacuum
Now that looks very interesting! Pity it's coded in C# but the exe can be run by PB.
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Fri Sep 19, 2014 1:45 pm
by Liqu
if only we can extract the .NET's System.Net.Mail
we can get free SSL / TLS haha
the downside using senditquiet is it needs .NET
Please let me know if you can convert it to PB or maybe make it usable on fresh installed XP ( portable .NET ? )
Thank you
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Sun Sep 21, 2014 8:58 pm
by IdeasVacuum
the downside using senditquiet is it needs .NET
That isn't a downside because all PC's, WinXP and up, have .NET, unless your app needs to work on Linux/OSX too.
Re: SendMail_Include.pbi (windows / linux / macos)
Posted: Wed May 13, 2015 7:27 pm
by normeus
I needed to send an HTML email, which cannot be done with PB mail library. Tried this library with NALOR changes and I get This error with multiple service providers. I am just showing hostgator as an example but it is not limited to them:
Code: Select all
[11:02:02] RCV >a.hostgator.com ESMTP Exim 4.82 #2 Wed, 13 May 2015 13:02:02 -0500 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.<
[11:02:02] SND >EHLO funkyLaptop-PC<
[11:02:02] RCV >b.hostgator.com Hello funkyLaptop-PC [192.168.0.39]250-SIZE 52428800250-8BITMIME250-PIPELINING250-AUTH PLAIN LOGIN250-STARTTLS250 HELP<
[11:02:02] ERR >Extension 'AUTH LOGIN' not supported - Quit<
has anyone run into this kind of error? any fix?
I used the previous version and it worked so it has to do with EHLO command.
Thank you.
Norm.