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 »

jqn wrote:Hi, gnozal

Very useful library, but I need a new feature:
In Headers are "Content-Type: text/plain; charset=iso-8859-1".

There is a way to change this?.
I will need "Content-Type: text/html; charset=iso-8859-1".

JOAQUN
For the next version (after my holidays :wink: )
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

This example from the Help doesn't work for me:

Code: Select all

MyPOP3Server.s = "pop3.test@test.fr"
MyPOP3Port.l = 110
MyPOPUser.s = "Test"
MyPOP3Password.s = "Test"
NumberOfMails.l = PureSMTP_POP3Messages(MyPOP3Server, MyPOP3Port, MyPOPUser, MyPOP3Password)
; Returns number of e-mails at POP3 server [>= 0 , else is error code]
If NumberOfMails >= 0
  MessageRequester("POP3", "You have " + Str(NumberOfMails) + " message(s)", 0)
Else
  MessageRequester("ERROR", "Error code = " + Str(NumberOfMails), 0)
EndIf
I always get an error code of -3, my login details are all correct and the
same as what I use with Outlook, which works perfectly... :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

PB wrote:This example from the Help doesn't work for me:
Sorry it worked for me. I don't use any POP3 server anymore.
The goal of the library was to handle SMTP functions, I only added this POP3 function for a friend wich used POP3 some time ago.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> The goal of the library was to handle SMTP functions

That's what I downloaded it for too, but it would have been nice to make use
of the POP3 function. Does that mean you don't intend to fix that function?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

PB wrote:> The goal of the library was to handle SMTP functions
That's what I downloaded it for too, but it would have been nice to make use of the POP3 function. Does that mean you don't intend to fix that function?
I don't have any POP3 server to play with.
What is the last server message (PureSMTP_LastServerMessage)?
Last edited by gnozal on Sat Aug 20, 2005 8:24 am, edited 1 time in total.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> I don't have any POP3 server to play with.

Oops, okay, I missed that bit. I'm tired. :)

> What is the last server message (PureSMTP_LastServerMessage)?

It's: +OK

I even turned off Kerio just to make doubly sure...
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

PB wrote:> I don't have any POP3 server to play with.
Oops, okay, I missed that bit. I'm tired. :)
> What is the last server message (PureSMTP_LastServerMessage)?
It's: +OK
I even turned off Kerio just to make doubly sure...
Strange.
I will change the function, use STAT instead of LIST.
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

Some user requests.
- SendMail() : like the Attachements argument, the MailTo argument now accepts multiple recipients ;
- POP3Messages() : changed, should work better but I have no POP3 server to test !
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

gnozal wrote:
jqn wrote:Hi, gnozal

Very useful library, but I need a new feature:
In Headers are "Content-Type: text/plain; charset=iso-8859-1".

There is a way to change this?.
I will need "Content-Type: text/html; charset=iso-8859-1".

JOAQUN
For the next version (after my holidays :wink: )
any news about "Content-Type: text/html"? :roll:

gnozal, Thank you for your very useful libs :D
PB 6.21 beta, PureVision User
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

zikitrake wrote:any news about "Content-Type: text/html"? :roll:
Oops, forgot that one :oops:
I will add it, promise.
zikitrake wrote:gnozal, Thank you for your very useful libs :D
Thanks :D
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

What's new :
- new function PureSMTP_SetContentType()
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

gnozal wrote:Update

What's new :
- new function PureSMTP_SetContentType()
:shock: fast boy! (not fat boy :lol: )

one (or two) thousand thanks

Tested: It's works great!
PB 6.21 beta, PureVision User
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes
- enhanced MailFrom argument for PureSMTP_SendMail()
. simple mail address : MailFrom = "name@domain.com"
. or real name + mail address : MailFrom = "Name <name@domain.com>"
- new function : PureSMTP_SetXMailer()
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
PHP
User
User
Posts: 65
Joined: Sat Sep 10, 2005 5:38 pm

Post by PHP »

W.O.W. !!! Really fast changes!!! :o :o :o :o
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

any chance to update it with Tailbite alpha? :lol: :D :roll:
PB 6.21 beta, PureVision User
Post Reply