Re: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client

2010-05-30 Thread Leonardo Miliani
Il giorno gio, 27/05/2010 alle 14.46 +0200, marco bra ha scritto:
 Ok i have posted all tests to you.
 
 As you can see also Evolution ( and also Outlook) loose attached file
 (the file is in the message source ) but it isn't able to open
 attachment.
 When smtp class generated message have body message and attachment.
 Only kmail can open and read all the message parts.
 
 Best Regards
 
 Marco
 
 --
 
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

I had in the past similar problems using SMTP module.
I agreed that it is a problem of the module that doesn't keep care of
the MIME types of the attachments, so if you include only the message
body or 1 file, it works correctly. But if you include a file, the
module mixes the MIMEs so that mail clients cannot undestand where the
body finishes and the attachment begins.

The only solution I found to send a mail from Gambas is using an
external mail prog like mutt and a server mail like procmail or
similars.
-- 
Leonardo Miliani
www.leonardomiliani.com

Webmaster e co-fondatore di www.gambas-it.org
Il portale di riferimento per i programmatori Gambas italiani


--

___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client

2010-05-30 Thread Benoît Minisini
 Il giorno gio, 27/05/2010 alle 14.46 +0200, marco bra ha scritto:
  Ok i have posted all tests to you.
  
  As you can see also Evolution ( and also Outlook) loose attached file
  (the file is in the message source ) but it isn't able to open
  attachment.
  When smtp class generated message have body message and attachment.
  Only kmail can open and read all the message parts.
  
  Best Regards
  
  Marco
  
  -
  -
  
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user
 
 I had in the past similar problems using SMTP module.
 I agreed that it is a problem of the module that doesn't keep care of
 the MIME types of the attachments, so if you include only the message
 body or 1 file, it works correctly. But if you include a file, the
 module mixes the MIMEs so that mail clients cannot undestand where the
 body finishes and the attachment begins.
 
 The only solution I found to send a mail from Gambas is using an
 external mail prog like mutt and a server mail like procmail or
 similars.

I think that the problem comes form a missing newline: can anyone try with 
revision #2982 to confirm or not?

Thanks in advance.

-- 
Benoît Minisini

--

___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client

2010-05-30 Thread marco bra
 I think that the problem comes form a missing newline: can anyone try with
 revision #2982 to confirm or not?

Tested on Ubuntu with Thunderbird Mozilla/5.0 (X11; U; Linux i686;
en-US; rv:1.9.3a5pre) Gecko/20100530 Shredder/3.2a1pre

Now it works...!

Many thanks

Marco

-- 
Linux Infinite Freedom

--

___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client

2010-05-27 Thread marco bra
Ok i have posted all tests to you.

As you can see also Evolution ( and also Outlook) loose attached file
(the file is in the message source ) but it isn't able to open
attachment.
When smtp class generated message have body message and attachment.
Only kmail can open and read all the message parts.

Best Regards

Marco

--

___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client

2010-05-25 Thread Benoît Minisini
 Using gambas 2.20.2-1~ppa~karmic1 on Ubuntu 9.10
 
 Below the code i test.
 
 PUBLIC SUB pbinviaposta_Click()
   DIM smtp AS NEW SmtpClient
 
   WITH smtp
 IF NOT IsNull(smtp) THEN
 '  .Alternative = FALSE
   .From = myinternalmailn...@mylocaldomain
   .Subject = My subject
   .Host = 192.168.100.18
   .Port = 25
   .To.Add(myinternalmailn...@mylocaldomain)
 
.Add(Body message never shown  on  client if there is also
 an attachment)
 
   
 .Add(File.Load(/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf
 ), application/pdf, test.pdf)
 
   TRY .Send()
 IF ERROR THEN Message.Error(Send mail failed)
   ENDIF
   END WITH
 END
 
 Testing send message: if i put body and attachement all is sent and
 using a mail client as Thunderbird the attached file is in the mail
 message source but i cannot view it, it seems a malformed multipart
 message the attacched file is not shown or cannot save it to my
 system, Thunderbird give me a message that the attachement is not good
 also tested with Outlook on Win.
 All goes fine if i put only body mail message or attachment, below my test:
 
 A)
 .Add(Body message never shown  on  client if there is also an attachment)
 .Add(File.Load(/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf)
 , application/pdf, test.pdf)
 from client i can see the body message but i got invalid attached file
 
 B)
 .Add(File.Load(/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf)
 , application/pdf, test.pdf)
 .Add(Body message never shown  on  client if there is also an attachment)
 from client i can ope the attached file but i cannot see the mail body
 message
 
 All goes fine if i send C or D:
 
 C)
 .Add(Body message never shown  on  client if there is also an attachment)
 
 D)
 .Add(File.Load(/usr/share/doc/texlive-base-bin-doc/dvipdfm/something.pdf)
 , application/pdf, test.pdf)
 
 
 Thank you
 Marco
 

Can you send me the source of a mail that is malformed? I can't tell you how, 
I don't use Thunderbird. Which may explain why it works fine there.

Regards,

-- 
Benoît Minisini

--

___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client

2010-05-24 Thread marco bra
Hi all,

with  with gambas 2.20 cannot create useful mail body message if i
have also attach a file to a message
all work fine if i sent only the body message or the attached file.

I supposed there must be a bug about this...

Do you have a working full tested example code to play with... ?

Many thanks

Marco

-- 
Linux Infinite Freedom

--

___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user