PureSMTP library : mail & attachments (AUTH supported)

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Amnesty wrote:Yes, I m working with the PB IDE.
How can I activate this subsystem ? Is it a command or checkbox ?
It's a string gadget in the compiler options.
Main menu -> Compiler -> Compiler options -> Library subsystem
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Amnesty
User
User
Posts: 54
Joined: Wed Jul 04, 2007 4:34 pm
Location: Germany

Post by Amnesty »

Thank you, it works.

I didn t know the meaning of this stringgadget.
User avatar
Frontier
User
User
Posts: 74
Joined: Thu Dec 22, 2005 2:43 pm
Location: Chios, Greece
Contact:

Post by Frontier »

Hi gnozal, thank you very much for this extremely useful library.

Just to inform you that PurePOP3, PureSMTP and PureZIP expose the "StringExtension" missing library error while compiling with PureBasic 4.30b2.

Hope that PB team releases the final version soon, so that you'll update your libraries (and maybe provide x64 versions, too :D ).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

I will release new versions for PB4.30 final only, as previous PB versions have shown that libs may be broken from one beta to another.
And only x86 libs, as I don't have a 64bits OS.
Thanks.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
KIKI
Enthusiast
Enthusiast
Posts: 145
Joined: Thu Dec 28, 2006 11:49 am
Location: FRANCE

Post by KIKI »

gnozal wrote:I will release new versions for PB4.30 final only, as previous PB versions have shown that libs may be broken from one beta to another.
And only x86 libs, as I don't have a 64bits OS.
Thanks.
HI, and what about gmail account ?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

KIKI wrote:HI, and what about gmail account ?
GMail uses SSL/TLS, so it is not supported.
Here is an example how to use SSL SMTP with STunnel : http://www.purebasic.fr/english/viewtopic.php?p=250094
Another possibility would be LibCurl I guess.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update [PB4.30 library version]

Changes :
- default time out is now 15 s
- PureSMTP_CloseSMTPConnection() only closes connection if server answer to 'QUIT' was '221'.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 206
Joined: Mon Jun 09, 2003 8:30 am

Post by bobobo »

trying to let the connection to the smtp-server open
leads to a message after
if connecting to a smtp-server with auth (user,password)
the connection is terminated (or something) after sending 4
mails with the errormessage
'421 auth.mail.onlinehome.de too many errors'
when the connection isn't opened and closed after each mail.

AND the prog needs too much systemresources when trying to send
with this error. a little delay while waiting for the serverresponse
may help ¿?

greetings from here

pb4.3 last lib
사십 둘 .
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

bobobo wrote:trying to let the connection to the smtp-server open
leads to a message after
if connecting to a smtp-server with auth (user,password)
the connection is terminated (or something) after sending 4
mails with the errormessage
'421 auth.mail.onlinehome.de too many errors'
when the connection isn't opened and closed after each mail.
Hum, I just sent 20 messages in a for/next loop to my SMTP server with auth (and without closing the connection each time) : no problem here.
1. Do you have any server error message before the 421 ?
2. Did you try with a delay between two PureSMTP_SendMail() calls ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 206
Joined: Mon Jun 09, 2003 8:30 am

Post by bobobo »

error 421 after 4 or 5 Messages
and no other errors before that

maybe it depends on the smpt-server .. the used smtp-server seems to
be a mail-relay-cluster and it's configuration may recognize some kind
of mailflooding in a rigid way.

i tested with an other smtp-server and there is no probs with sending much more than 1 mail with an opened connection

2.
a delay (tested with 500msec and 1000msec and even 5000msec)
does help a little bit but when the smpt-server delays in serving answers
the systemresources of the program rise up to 100% (50% with double-
processor) (unfortunately best tested with the mail-relay-cluster from
above which serves errors)

also while sending a bit bigger mails the sys-res rises remarkable
사십 둘 .
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 206
Joined: Mon Jun 09, 2003 8:30 am

Post by bobobo »

another kind of error (not sure if it is one)

the 'mailfrom' is in brackets (f.i. <hans@wurst.de>)

one of my 'mail-buddies' can't read those mailfroms because of this brackets.



ok ok .. i know smtp-protocoll says that it is ok with brackets ,but it will
help me (and propably others) if the brackets could be optinal suppressed.

greetings
사십 둘 .
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

bobobo wrote:ok ok .. i know smtp-protocoll says that it is ok with brackets ,but it will help me (and propably others) if the brackets could be optinal suppressed.
Like you said, it's the SMTP protocol.
RFC2821 wrote: MAIL FROM:<reverse-path> [SP <mail-parameters> ] <CRLF>

This command tells the SMTP-receiver that a new mail transaction is
starting and to reset all its state tables and buffers, including any
recipients or mail data. The <reverse-path> portion of the first or
only argument contains the source mailbox (between "<" and ">"
brackets), ...
So I won't change this, sorry.
I (respectfully) suggest that your buddy changes his (buggy ?) mail client.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 206
Joined: Mon Jun 09, 2003 8:30 am

Post by bobobo »

i already thought that.

thanks for your efforts :D

maybe i got some success with additional header-items ..

i'll see :wink:
사십 둘 .
User avatar
doctorized
Addict
Addict
Posts: 882
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

Spam mail

Post by doctorized »

I use the example code included in the zip file of PureSMTP lib and all the massages sent goes to the spam folder and not the inbox. Why?
User avatar
doctorized
Addict
Addict
Posts: 882
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

SMTP connection fails

Post by doctorized »

When I try to send a mail from my computer at home (Athlon 64 X2 5600+ CPU, 24Mbps connection) all the messages are sent normally. When I try to send from my computer at work (Pentium 4 1,7GHz CPU, 2Mbps connection) the program cannot connect with smtp server. Why?
Post Reply