It is currently Fri May 24, 2013 7:44 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 355 posts ]  Go to page Previous  1 ... 16, 17, 18, 19, 20, 21, 22 ... 24  Next
Author Message
 Post subject:
PostPosted: Fri Apr 03, 2009 6:26 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 333
Location: Athens, Greece
gnozal wrote:
I guess PureSMTP_OpenSMTPConnection() fails because you have a corporate firewall / proxy at work, and unfortunately Purebasic network functions don't support proxies.
I have the same issue at work.


I am a teacher, so we have a computer that is connected directly to the internet through the greek school network. AVG 8.5 internet security is installed and even if I disable the firewall component, PureSMTP_OpenSMTPConnection() fails. I am thinking this: there is a server of the greek school network, that lies somewhere in Athens, and I think that this server may block the connections to servers other than itself. I do not know if this is possible. This server is definitely intercalated between me and the web because some sites are not accessable and a message saying that the page cannot be viewed because of the content, so I think that it may be responsible for my problem.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 06, 2009 7:37 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 333
Location: Athens, Greece
gnozal wrote:
I guess PureSMTP_OpenSMTPConnection() fails because you have a corporate firewall / proxy at work, and unfortunately Purebasic network functions don't support proxies.
I have the same issue at work.


I was right! I tried to send through the school server and the mail sent. Can I do something to be able to send via gmx or any other server that I have account? I need a way to bypass the stupid mail.att.sch.gr server.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 06, 2009 8:00 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
doctorized wrote:
I was right! I tried to send through the school server and the mail sent. Can I do something to be able to send via gmx or any other server that I have account? I need a way to bypass the stupid mail.att.sch.gr server.
Did you try to use PureSMTP_OpenSMTPConnection() with the gmx server ?

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 06, 2009 10:41 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 333
Location: Athens, Greece
gnozal wrote:
Did you try to use PureSMTP_OpenSMTPConnection() with the gmx server ?


Yes, the first server that I used was gmx (mail.gmx.com). I found a list with about 350 servers (http://www.e-eeasy.com/SMTPServerList.aspx), the code connected with none of them. Only the school server connects correctly.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 06, 2009 10:49 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
doctorized wrote:
gnozal wrote:
Did you try to use PureSMTP_OpenSMTPConnection() with the gmx server ?

Yes, the first server that I used was gmx (mail.gmx.com). I found a list with about 350 servers (http://www.e-eeasy.com/SMTPServerList.aspx), the code connected with none of them. Only the school server connects correctly.
I am sorry, but I don't know how to 'bypass' a firewall in Purebasic.
Maybe HTTP tunneling (like Yourfreedom) would work, but it's a bit overkill ...

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 18, 2009 10:47 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Update (PB4.3x version only)

Changes :
- enhanced function PureSMTP_SendMail() : added memory attachments.
  You may specify a memory bank instead of a filename.
    . syntax : use "mem:{Filename}:{*InputBuffer}:{InputBufferLength}" instead of "{Path+Filename}"
    . example :
Code:
...
      If ReadFile(666, "c:\PureBasic430\Program\test.zip")
        InMemAttachmentLen = Lof(666)
        *InMemAttachment = AllocateMemory(InMemAttachmentLen)
        If *InMemAttachment
          ReadData(666, *InMemAttachment, InMemAttachmentLen)
          Attachments.s = "mem:test.zip:" + Str(*InMemAttachment) +":" +  Str(InMemAttachmentLen)
        EndIf
        CloseFile(666)
      EndIf
...

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject: Re:
PostPosted: Sun Sep 13, 2009 5:39 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 333
Location: Athens, Greece
gnozal wrote:
only x86 libs, as I don't have a 64bits OS.


I have 64bit XP PRO, Windows 7 x64 and PB x64 4.30. I can help you make x64 lib.

_________________
http://kc2000labs.shadowtavern.com/pb/pb_eng.htm


Top
 Profile  
 
 Post subject: Char(10) lost after file transfer with PureSMTP
PostPosted: Fri Jun 04, 2010 8:44 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 333
Location: Athens, Greece
I use Gnozal's PureSMTP to send mails with attachments.
I have some codes like this one:
Code:
CreateFile(0,"c:\text.txt")
WriteStringN(0, FormatDate("%dd/%mm/%yyyy - %hh:%ii:%ss",Date()))
WriteString(0,"Text saved")
CloseFile(0)

If PureSMTP_OpenSMTPConnection("your smtp server", 25) = #PureSMTP_Ok
   MailTo.s = "the taker address"
   MailFrom.s = "your email address"
   UserName.s = "your id"
   Password.s = "your password"
   Subject.s ="Hi!"
   MsgBody.s = "file attached"
   Attachments.s = "c:\text.txt"
   
   Status.l = PureSMTP_SendMail(MailTo, MailFrom, Subject, MsgBody, Attachments, UserName, Password)
   PureSMTP_CloseSMTPConnection()
   If Status = #PureSMTP_Ok
      Debug "file sent"
   Else
      Debug "failed"
   EndIf
Else
   Debug "connection failed"
EndIf
When I downloaded the file, I noticed that the enter key, chr(10) + chr(13), is not normally present. Chr(10) is missing after the date, only chr(13) is present.
The original file on my hard disk has chr(10) but the downloaded one doesn't. If I try to sent bigger files then chr(10) is present. Can somebody explain me why, please?

_________________
http://kc2000labs.shadowtavern.com/pb/pb_eng.htm


Top
 Profile  
 
 Post subject: Re: Char(10) lost after file transfer with PureSMTP
PostPosted: Sat Jun 05, 2010 2:37 am 
Offline
User
User

Joined: Tue Apr 13, 2010 8:02 am
Posts: 54
It's probably your mail client saving the file, that's causing the problem. When I run your code, the saved file is exactly the same as what the code originally created, except for a new added CRLF at the end of it. So, my client (Outlook) adds a single new CRLF when saving the attachment. Other than that, the file attachment is 100% the same, byte-for-byte (confirmed with a hex editor), as it was created. Don't forget that Outlook strips line breaks in emails, so that may be doing something to the attachment too.


Top
 Profile  
 
 Post subject: Re: Char(10) lost after file transfer with PureSMTP
PostPosted: Sat Jun 05, 2010 2:37 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 333
Location: Athens, Greece
Mr Coder wrote:
Don't forget that Outlook strips line breaks in emails, so that may be doing something to the attachment too.

I am not using any client. I send the mail with PB and then I download the attachment from the provider's web page with Firefox.

_________________
http://kc2000labs.shadowtavern.com/pb/pb_eng.htm


Top
 Profile  
 
 Post subject: Re: Char(10) lost after file transfer with PureSMTP
PostPosted: Sat Jun 05, 2010 2:56 pm 
Offline
User
User

Joined: Tue Apr 13, 2010 8:02 am
Posts: 54
Try the same code with PureBasic's mail sending, and see if it works. That way we'll know if PureSMTP has a bug or not. I doubt it does, though. Sounds like the mail server or downloading action is modifying the text file on the fly. Try also mailing a binary file (an executable?) with PureSMTP, and if that comes through okay then PureSMTP is definitely not the problem.


Top
 Profile  
 
 Post subject: Re: Char(10) lost after file transfer with PureSMTP
PostPosted: Sat Jun 05, 2010 3:15 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 333
Location: Athens, Greece
Mr Coder wrote:
Try also mailing a binary file (an executable?) with PureSMTP

I sent a dll file and the downloaded file has the same CRC32 code with the original one, so PureSMTP
works fine. I did one more test and found out this: if the taker is gmx.com or yahoo.com then chr(10)
is lost after downloading, but when the taker is hotmail.com then the file comes back ok. I did it with both
IE and firefox so the downloading action is not responsible for this. Why do yahoo and gmx f*ck attachments?

_________________
http://kc2000labs.shadowtavern.com/pb/pb_eng.htm


Top
 Profile  
 
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Sat Jul 10, 2010 3:27 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Jul 12, 2006 4:38 pm
Posts: 384
Location: UK
POLINK error _PB_StringBasePosition using PB4.50 with threadsafe switched on


Top
 Profile  
 
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Sat Jul 10, 2010 7:36 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
AndyMK wrote:
POLINK error _PB_StringBasePosition using PB4.50 with threadsafe switched on
Did you enable the 'UserLibThreadSafe' subsystem ?
PureSMTP.chm (How to use this library in unicode and/or thread-safe mode) wrote:
This library exists in several versions :
- the standard version, located in %Purebasic%\PureLibraries\UserLibraries\ ;
- the thread-safe version, located in %Purebasic%\SubSystems\UserLibThreadSafe\PureLibraries\ .
- the unicode version, located in %Purebasic%\SubSystems\UserLibUnicode\PureLibraries\ .
- the unicode + thread-safe version, located in %Purebasic%\SubSystems\UserLibunicodeThreadSafe\PureLibraries\ .
In order to use this library in thread-safe mode (compiler option /THREAD), you have to enable the subsystem 'UserLibThreadSafe'
in the PB IDE, or add '/SUBSYSTEM UserLibThreadSafe' to the PBCompiler arguments. In jaPBe, do nothing : it will automatically
enable the 'UserLibThreadSafe' subsystem to use the threadsafe versions of the installed userlibraries.
It's the same logic for unicode and unicode + thread-safe modes.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
 
 Post subject: Re: PureSMTP library : mail & attachments (AUTH supported)
PostPosted: Sat Jul 10, 2010 10:01 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Jul 12, 2006 4:38 pm
Posts: 384
Location: UK
Thanks, didn't see that one.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 355 posts ]  Go to page Previous  1 ... 16, 17, 18, 19, 20, 21, 22 ... 24  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye