[Gambas-user] PDF file sent by gb.net.smtp

Leonardo Miliani leonardo at ...1237...
Fri Apr 18 12:26:21 CEST 2008


Leonardo Miliani ha scritto:
> Is it possible to send a PDF file using the gb.net.smtp component?
> I made some tests and I was not able to get my file be sent by the
> component. I only received an empty document...
> Maybe the PDF Mime type isn't supported?
> 

I used this code:
PUBLIC SUB SendMail_Click()
DIM PostService AS NEW SmtpClient

  PostService.To.Add(Trim(txtEmail.Text))
  PostService.Subject = Trim(txtSubject.Text)
  PostService.Add(txtText.Text)
  PostService.Add(FileChooser1.SelectedPath, "application/pdf",
"document.pdf")
  PostService.From = "xxxxxxx at ...1889..."
  PostService.Host = "xxxxx.yyyyyy.zzz"
  PostService.Send
  Message("Message sent")

END


-- 
Ciao.
Leo.

Web: www.leonardomiliani.com
E-mail: leonardo at ...1237...
Scegli software opensource - Choose opensource software

Co-fondatore di Gambas-it.org
Il sito di riferimento della comunità italiana degli utenti di Gambas
www.gambas-it.org




More information about the User mailing list