' Gambas module file

Public Sub Main()

  ' Dim hClient As New SmtpClient
  
  ' hClient.Host = "smtp.gmail.com"
  ' hClient.Encrypt = Net.SSL
  ' hClient.User = "benoit.minisini@gmail.com"
  ' Print "Password:"
  ' Line Input hClient.Password
  ' hClient.Debug = True
  ' 
  ' hClient.Subject = "Test d'un sujet en UTF-8: == l'histoire d'un tout petit bébé =="
  ' hClient.From = "benoit@minisini.fr"
  ' hClient.To.Add("Benoît Minisini <benoit.minisini@gmail.com>")
  ' hClient.Body = "This is a test e-mail.I hope it will work...Il était une fois un tout petit bébé   =====JOLI HISTOIRE.  Il y a une pièce jointe !"
  ' hClient.Add(File.Load("~/TexteDehorsilpleut.odt"), "application/vnd.oasis.opendocument.text", "Dehors il pleut.odt")
  ' hClient.Add(File.Load("~/balloon.png"), "image/png", "balloon.png")
  ' hClient.Send
  
  'Dim hMail As New SmtpClient
  
  ' Dim sChallenge As String
  ' Dim sKey As String
  ' Dim sCommand As String
  ' Dim sResult As String
  ' 
  ' sChallenge = "'abc'"
  ' sKey = "benoit"
  ' 
  ' sCommand = "echo -n " & Shell$(sChallenge) & " | openssl md5 -hmac " & Shell$(sKey)
  ' Shell sCommand To sResult
  ' Print sResult
  ' 
  ' sCommand = "openssl md5 -hmac " & Shell$(sKey) & " << EOF'abc'"
  ' Shell sCommand To sResult
  ' Print sResult
  ' 
  ' Return
  
  ' hMsg.Debug = True
  ' hMsg.To.Add("benoit@minisini.fr")
  ' hMsg.Subject = "Test mail #2"
  ' hMsg.Add("Something" & "" & ("-- Powered by ") & Application.Name & "")
  ' hMsg.From = "benoit.minisini@gmail.com"
  ' 'hMsg.Host = "smtp.free.fr"
  ' hMsg.Host = "smtp.gmail.com"
  ' hMsg.Encrypt = Net.TLS
  ' hMsg.User = "benoit.minisini@gmail.com"
  ' hMsg.Password = "*****"
  'hMsg.Port = 587
  
  
  'hMail.Debug = True
  ' Try hMail.Send()
  ' 
  ' If Not Error Then
  '   Print "Send successfully"
  ' Else
  '   Print "Send Failed: "; Error.Text
  ' Endif

  Print Quote(Conv(FromBase64("[encoded data, 5420 characters]"), "ISO8859-15", "UTF-8"))

End


