[Gambas-user] Resolved: how to add attachment and include in file body

Ivan Williams ivanwms64 at yahoo.com
Thu Dec 5 22:25:27 CET 2019


Figured out how to attach the file -  for future reference in case anyone else has the issues I had today...
Ivan

  Dim Email As New SmtpClient  Dim ftext As String    ftext = File.load("/media/ShortBox/Stats/pmail.txt")    Email.Host = "smtp.gmail.com"  Email.User = "bbunny at gmail.com"  Email.Password = "whatsupdoc!"   Email.Port = 465  Email.Authentication = SmtpClient.Plain
  Email.Encrypt = Net.SSL

  Email.From = "bbunny at gmail.com"  Email.To.Add("dduck at yahoo.com")
  Email.Subject = "foghorns nephew"  Email.Body = ftext     Email.Add(ftext, "text/plain", "egghead jr")    Email.Send  Print "Mail Sent..."

 'sent previous email to wrong address - resending to correct address\




Ivan    \~/


 

I never saw a wild thing sorry for itself.
A small bird will drop frozen dead from a bough
Without ever having felt sorry for itself.
-- D.H. Lawrence





http://www.usconstitution.net/const.html


Linux - Live Free or Die.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20191205/cc93816e/attachment.html>


More information about the User mailing list