PureSMTP library : mail & attachments (AUTH supported)

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

Moderator: gnozal

User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

ah ok,

so i will try to increase this value because i'm using my program on a Terminal Server
on a (very) distant server which is very busy (about 50 TSE connection at the same time).

thank you gnozal for your support - very kind.

i will inform you after some tests.....
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

Seems to be Ok now with a 10 seconds TimeOut.

:P thanks.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

Ok, previous problem is now ok.

But now i'm wondering how i can use PureSMTP with a gmail account.

It needs a TLS secured authentification on port 25.

here is the response of the gmail server :

last code is: -3
last message is: 530 5.7.0 Must issue a STARTTLS command first
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Flype wrote:Ok, previous problem is now ok.

But now i'm wondering how i can use PureSMTP with a gmail account.

It needs a TLS secured authentification on port 25.
PureSMTP and PurePOP3 won't work with GMAIL.
The Google Gmail Server requires an encrypted connection (SSL). And this I don't know how to do (nor have time for this at the moment).
Sorry.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

no problem - i can live without PureSMTP / GMail :)
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

Hello gnozal,

How can i send Cc: (copies) ?

I tried to do it using AddHeader("Cc", "test1@test.com;test2@test.com") but it doesn't works.

:?:
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

If you add CC, can you also add BCC? :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Flype wrote:How can i send Cc: (copies) ?
You can't (never thought of that)
DoubleDutch wrote:If you add CC, can you also add BCC?
If I add it, why not.

Maybe I will add it, if it doesn't imply to change the current PureSMTP_SendMail() syntax.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

Yes please, i really need it for my work.
And it is just one more line in the header of the mail.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Ok, here it is, please test : http://freenet-homepage.de/gnozal/PureSMTP_BETA.zip (ANSI beta library for PB4)

To be compatible with the older versions, it works this way :
PureSMTP_SendMail(MailTo.s, MailFrom.s, Subject.s, MsgBody.s [, Attachments.s [, UserName.s [, Password.s [, HeaderAddon.s]]]])
To specify CC: or BCC:, just add "cc:" or "bcc:" before the address in MailTo.
Example : MailTo = "User1@Server1.fr;cc:User2@Server2.us;bcc:UserX@ServerX.ru"

If it works ok I will release the other library versions.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

I've done just a few tests - all seems ok.

I would like to thank you for your kindness - once again.

Image (french smiley)
Last edited by Flype on Thu Jan 25, 2007 2:24 pm, edited 2 times in total.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Nice way of doing it. :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Thanks both :wink:

Update (both versions)

Changes :
- you can now add 'cc:' or 'bcc:' before the recipients addresses to enable carbon copy or blind carbon copy.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

this last update is also ok.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Frontier
User
User
Posts: 74
Joined: Thu Dec 22, 2005 2:43 pm
Location: Chios, Greece
Contact:

Post by Frontier »

Thank you gnozal for your excellent library.

I do have one question however: how can I send e-mail messages with non-latin characters (in particular Greek, with ISO page 8859-7) with attachments, without PureSMTP destroying the attachment?

I've tried PureSMTP_SetContentType("multipart/mixed; charset=iso-8859-7") together with PureSMTP_SetBoundary(), but I get the e-mail with the attachment in base64 form, inside the message body (i.e it can't be saved as an attachment).

Thank you very much for your help and efforts providing this library.
Post Reply