[Gambas-user] smtp mail with gambas 2.20 sent mail body message and/or attached file not sowhon/opened by client
Benoît Minisini
gambas at ...1...
Tue May 25 12:06:43 CEST 2010
> 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 = "myinternalmailname at ...2437..."
> .Subject = "My subject"
> .Host = "192.168.100.18"
> .Port = 25
> .To.Add("myinternalmailname at ...2437...")
>
> .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
More information about the User
mailing list