Page 1 of 2

Can't send a ZIP file with the lib MAIL

Posted: Sun Oct 16, 2016 1:09 pm
by Kwai chang caine
Hello at all

I know it's incredible, but i have try during an hour before write this topic
I have change several time the zip file, with image or text for be sure the problem is not with the ZIP file

If i use this code and the ZIP extension, the mail received have no attachment :shock:
If i just delete the "p" of ZIP so sending a "File.zi" that's works, the mail come with the "File.zi" attachment, and it's exactely the same thing with another extension, or even without extension...that's works
Apparently they are a problem only if the extension is ZIP

I have try with the 5.20, 5.40, 5.50 and it's the same thing. :shock:

Code: Select all

InitNetwork()
Mail$ = "xxxxxx@xxxx.fr"
Smtp$ = "smtp.XXX.fr"

If CreateMail(0, Mail$, "Hello !")

  SetMailBody(0, "Hello !" + #CRLF$ + "This is a multi-" + #CRLF$ + "line mail !")
  AddMailAttachment(0, "Geebee !"  , "C:\Temp\DS000001.zip") ; <===== not works because ZIP extension, but works with ".zi" extension for example
  
  ; Change the recipients to real one
  AddMailRecipient(0, Mail$, #PB_Mail_To)
  
  ; Set the SMTP server to use
  Result = SendMail(0, Smtp$, 25)
  
  Repeat
   Progress = MailProgress(0)
   Delay(300)
  Until Progress = #PB_Mail_Finished Or Progress = #PB_Mail_Error
  
  If Progress = #PB_Mail_Finished
    MessageRequester("Information", "Mail correctly sent !")
  Else
    MessageRequester("Error", "Can't sent the mail !")
  EndIf
  
EndIf
Have a good day

Re: Can' send ZIP file

Posted: Sun Oct 16, 2016 1:14 pm
by Keya
if its letting you send .zi files ok but not .zip that might suggest the mail server is filtering the .zip for whatever reason... exe inside maybe? is zip the only filetype its having problems with? what about jpg? exe? (if its filtering zip it would probably filter exe too im guessing)

Re: Can't send a ZIP file with the lib MAIL

Posted: Sun Oct 16, 2016 1:20 pm
by ts-soft
Some Attachments a blocked by the mail-provider. G-Mail for example blocks:
.ADE, .ADP, .BAT, .CHM, .CMD, .COM, .CPL, .EXE, .HTA, .INS, .ISP, .JAR, .JSE, .LIB, .LNK, .MDE, .MSC, .MSP, .MST, .PIF, .SCR, .SCT, .SHB, .SYS, .VB, .VBE, .VBS, .VXD, .WSC, .WSF, .WSH
It's for security reason.

Re: Can't send a ZIP file with the lib MAIL

Posted: Sun Oct 16, 2016 2:03 pm
by Kwai chang caine
Aaaaahh ok !!! Thanks a lot for yours explanations 8)
I believe become crazy after x try :lol:
It's strange, never i have see this behavior before :shock:
I have also thinking to my antivirus, but apparently not...
Again thanks..

Re: Can't send a ZIP file with the lib MAIL

Posted: Sun Oct 16, 2016 2:37 pm
by Kwai chang caine
Always also strange. ..
I have try with another machine...
And after, i have change the adress sending, but i can't change my provider
Then i have sending a zip with my client mail foxmail, and here...no problem. ..the attachment come without problem. ..so it's not a filter of my provider.
An history of mad. .... i understand nothing. :shock:

Re: Can't send a ZIP file with the lib MAIL

Posted: Tue Oct 18, 2016 3:56 pm
by ar-s
If you re using free as email, the zip file is not receive as an archive.. It is receive as datacode like :
UEsDBBQAAQAIAFRXUkkaMQ7cTFEBANhRAQAIAAAAVkxBdS5wbmcOWjcMmPzZ0Kv1mL/587KI
SHDKu6gnrkxyGr+AOc9b9D9nYgQNxwZ8g6cKT8gfBFJ01nzG2Hj+EXhmxaXxsLk8FXszgyxB
4EvW6gA+N/ALKEivtyblSi1wmjB9lFbFMVsBXN0+6Q1MVNLV467k1tFy2uSRt+tFaxycFVlJ
FsZCrfJpPMdLyWqvIkj6csFVVWgpNGkHUggEFjMJWUslph4WopdzdiiDF1QptO/UeKtxtO1q
SEaZMCOX55ZRGbscLUtTF8fWr/TtoxYwVPqeA5T1sCovBp1KgHRWxIbt7R8C5kK4gGF9jl+7
f/MprmE283FIDFQ0gX4AeRdEbNbaK/TpZa7FGymFum1XrkpZa2By5PmZdGmegKvzKif04FKU
etc etc

Re: Can't send a ZIP file with the lib MAIL

Posted: Tue Oct 18, 2016 4:51 pm
by Kwai chang caine
Yeeeeees !!!! you have exactely the same problem that me !!!!
I believe i'm alone in the world to have this problem :shock:

Image

In fact i use "mamadou" like provider, and it's exactely the same behavior
Thanks a lot ARS to have spent your time to try 8)

Re: Can't send a ZIP file with the lib MAIL

Posted: Wed Oct 19, 2016 8:32 am
by Dude
Sending zips works fine for me, so it seems to just be a mail server issue for you and not a bug (sorry to say).

Re: Can't send a ZIP file with the lib MAIL

Posted: Wed Oct 19, 2016 12:08 pm
by ar-s
mail server issue
yep, it's the "free Fai" mail server problem.
KCC just have to use 7zp or another one. Or simply rename the .zip to .piz :) It's a simple crappy extension filter. :twisted:

Re: Can't send a ZIP file with the lib MAIL

Posted: Wed Oct 19, 2016 12:57 pm
by Kwai chang caine
Thanks DUDE to try 8)
Again a crazy french specificity :?
Aaaaah this french. ..never do like all :oops:

Perhap Fred can when even search why Free and Wanadoo not have the same behavior with the PB mail lib

Re: Can't send a ZIP file with the lib MAIL

Posted: Wed Oct 19, 2016 2:28 pm
by heartbone
ts-soft wrote:Some Attachments a blocked by the mail-provider. G-Mail for example blocks:
.ADE, .ADP, .BAT, .CHM, .CMD, .COM, .CPL, .EXE, .HTA, .INS, .ISP, .JAR, .JSE, .LIB, .LNK, .MDE, .MSC, .MSP, .MST, .PIF, .SCR, .SCT, .SHB, .SYS, .VB, .VBE, .VBS, .VXD, .WSC, .WSF, .WSH
It's for security reason.
Security reason??? I doubt it..
I think it's the result of encouraging the fear based mindset that is necessary for the kabbal to maintain control of "Western" culture.
Fortunately Yahoo! Mail still treats its users like adults and executables can still be mailed.

Send an executable to a G-mail address, the recipient does not get it, or even know about it.
Of course Google keeps a copy. Do you think that is ethical behavior? I don't.

Re: Can't send a ZIP file with the lib MAIL

Posted: Thu Oct 20, 2016 7:52 am
by Kwai chang caine
Now we are too much guarded for security reason, soon it's prohibited to use a computer.
Like this no problem with the securty
In fact, a good machine is a off machine :mrgreen:

Re: Can't send a ZIP file with the lib MAIL

Posted: Thu Oct 20, 2016 8:25 am
by Dude
Kwai chang caine wrote:Perhap Fred can when even search why Free and Wanadoo not have the same behavior with the PB mail lib
It's not Fred's problem. He supplies the tools only. If other services don't want to accept those tools, it's not his fault. He's coded the mail lib to conform to SMTP standards, and that's all he has to do. Your mail server is the problem.

Re: Can't send a ZIP file with the lib MAIL

Posted: Thu Oct 20, 2016 9:39 am
by Kwai chang caine
No justly :wink:
It's apparently not the provider the problem
Because when i send the same mail with my client mail "FoxMail" all are done 8)
And when i send with the PB lib, the ZIP and only the ZIP extension, are coding in base64 and embeded into the mail body :shock:

So today FALSAM in french forum have perhaps found a way, for that's works 8)
http://www.purebasic.fr/french/viewtopi ... 45#p187245
I can't test it today, because now i'm behind a PROXY who not allow the port 25 :?
But apparently FALSAM have the same behavior without the MIME type

Code: Select all

If AddMailAttachment(0, fichier$, fichiert$ )
and that's works with

Code: Select all

If AddMailAttachment(0, fichier$, fichiert$, "application/zip")
But i don't know if it's a normal behavior ??? :shock:
And it's for that, i say, perhaps FRED not send all the informations, about the attachment to the server :wink:

Re: Can't send a ZIP file with the lib MAIL

Posted: Thu Oct 20, 2016 11:04 am
by Dude
Kwai chang caine wrote:Because when i send the same mail with my client mail "FoxMail" all are done 8)
That's strange, then. I take back what I said... maybe more investigating is needed. Sorry!