[Gambas-user] PDF file

Benoit Minisini gambas at ...1...
Sat Jun 30 12:53:41 CEST 2007


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




More information about the User mailing list