[Gambas-user] PDF file

Steven Lobbezoo steven at ...1652...
Sat Jun 30 10:19:50 CEST 2007


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




Le vendredi 29 juin 2007 08:46, timothy a écrit :
> > > > I got the file, and I succeeded in sending it to myself by using
> > >
> > > another
> > >
> > > > Internet provider. I didn't get any error. Here is the code I
>
> used:
> > > >   DIM hSmtpClient AS NEW SmtpClient
> > > >
> > > >   WITH hSmtpClient
> > > >
> > > >     .Host = "smtp.noos.fr"
> > > >     .From = "gambas at ...764..."
> > > >     .Subject = "Test du composant SMTP de Gambas - " & Str(Now)
> > > >     .To.Add("XXXXX") ' Here is my private e-mail address
> > > >     .Add(File.Load("~/tempfile.pdf"), "application/pdf")
> > > >
> > > >     .Send()
> > > >
> > > >   END WITH
> > > >
> > > > --
> > > > Benoit Minisini
> > >
> > > I am probably missing something very simple. But how do you set the
> > > message body of the SmtpClient email. There appears to be no Body
> > > property?
> > >
> > > Thanks
> > >
> > > 8-{)} Timothy Marshal-Nichols
> > > <mailto: timothy.marshal-nichols at ...247...>
> >
> > Timothy,
> >
> > The reponse is in Benoits text :
> >
> > 	hSmtpClient.Add( "something text")
> > or
> > 	hSmtpClient.Add(something else, mimetype)
> >
> > Steven
>
> Thanks, I have just tried this. Alas it adds a text attachment to the
> mail message. Which I guess is what you would expect when looking at the
> help. It does not set the message body.
>
>
> Thanks
>
> 8-{)} Timothy Marshal-Nichols
> <mailto: timothy.marshal-nichols at ...247...>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list