[Gambas-user] ProgressBar and Smtp control

Andrea Bertini and.bertini at ...626...
Thu Aug 4 23:03:06 CEST 2011


 >but this time depend of the server, no ?

(a) this code don't works good, progress bar move all to the end of the 
process:

private errore as integer
private endprocess as boolean

public sub SendMail()
Dim n As Integer
Dim x As Integer

If txtTitle.text = "" Or EDITOR_MAIL.TextEdit1.RichText = "" Then
   errore = 1
   Message("Impossible to send data, data not complete")
Else
    SmtpClient1.To.Add(toemail.text)
    SmtpClient1.Subject = txtTitle.text
    SmtpClient1.Add(EDITOR_MAIL.TextEdit1.RichText, "text/html")
    Timer1.Enabled = True
    ProgressBar1.Value = 0
    endprocess = False
    SmtpClient1.Send
    endprocess = True
    Message("Email sent.")
Endif
End

Public Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 0.05
If endprocess=true Then
Timer1.Enabled = False
End If
End

(b) I must have the possibility to send these mime types:
Libre Office (Calc, Write, Impress)
Office (Excel, Word, Powerpoint)
Acrobat (Pdf)
Images and video
Can me explein the right code to add these file to the mail?

Thx

Andrea Bertini




More information about the User mailing list