[Gambas-user] PDF file

timothy timothy.marshal-nichols at ...247...
Mon Jul 2 09:07:04 CEST 2007



> -----Original Message-----
> From: gambas-user-bounces at lists.sourceforge.net [mailto:gambas-user-
> bounces at lists.sourceforge.net] On Behalf Of Benoit Minisini
> Sent: Saturday, 30 June 2007 11:54 AM
> To: mailing list for gambas users
> Subject: Re: [Gambas-user] PDF file
> 
> On samedi 30 juin 2007, Steven Lobbezoo wrote:
> > I dont get it.
> > If I do this :
> >
> >       FOR EACH tmp IN ToMails
> >         Ema.To.Add(tmp)
> >       NEXT
> >
> >       Ema.From = MGlobal.U_Mail
> >       Ema.Subject = "Voici votre information concernant le bien " &
> ME.Tag
> >       Ema.Host = "revimmo.com"
> >       Ema.Alternative = FALSE
> >       Ema.Add("Voici votre fichier pdf avec les données principales
sur
> le
> > bien " & ME.Tag &
> >               "\nNous sommes toujours a votre service pour des
> > renseignements supplementaires" &
> >               "\n\nDe la part de " & MGlobal.U_Nom & " de " &
> > MGlobal.U_AgenNom &
> >               "\n" & MGlobal.U_AgenStreet &
> >               "\n" & Mglobal.U_AgenPlz & "  " & Mglobal.U_AgenVille
&
> >               "\nTel.: " & MGlobal.U_AgenTel & "  et Fax : " &
> > MGlobal.U_AgenFax &
> >               "\n\nMon portable est : " & MGlobal.U_Cell)
> >       Ema.Add(file.Load(User.Home
> > & "/request/work/tempfile.pdf"), "application/pdf", ME.Tag & ".pdf")
> >
> >       Ema.Send
> >       message.Info("Vos message(s) sont envoyées")
> >
> >
> > I get a message with the text AND an attachement (pdf file)
> >
> > Works exactly correct with me
> >
> > Steven
> >
> 
> The final visual result depends on the mail reader.
> 
> There is no difference between the body of the mail and attached files
in
> the
> SMTP + MIME protocol. There are all parts of a 'multipart/mixed' MIME
> message. The only difference is that the body is the first part, and
that
> it
> is a 'text/plain' part.
> 
> Regards,
> 
> --
> Benoit Minisini
> 

I was sending the mail on a Linux system (obviously) and reading it in
(ugh spit) MS Outlook. So I tried reading the mail in Evolution. Still
the same result.

This is what I was using:

PUBLIC SUB SendMoreMail()
  DIM simpleSmtpClient AS NEW SmtpClient
  WITH simpleSmtpClient  
    .Host = "smtp.myserver.com"
    .From = "from mail address"
    .Subject = "Test du composant SMTP de Gambas - " & Str(Now)
    .To.Add("to mail address") 
    .Add("Demo mail body", "text/plain")
    .Send()
  END WITH 
END
 
Based on Benoit's example. It’s the same result with or without the mime
type. By the way I am using Gambas 1.9.49 on an openSUSE 10.2 system.

Thanks

8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>








More information about the User mailing list