[Gambas-user] smtp attachments/body in email

Ivan Williams ivanwms64 at yahoo.com
Thu Dec 5 21:49:42 CET 2019


Greetings once more,
I am successfully able to send email but I cannot successfully attach the file to the email.  I would like to put the text of the file within the body of the email but when I do so the filename is the only thing in the body of the email and when I attempt to attach the file I get the name of the file witht he path attached.
 
  Email.Body = "/media/ShortBox/Stats/pmail.txt"
  Email.Add("string", "text/plain", "/media/ShortBox/Stats/pmail.txt")

  I have tried - string, stream, text but I still do not receive the file contents in the email body or as a attachment.  The file does have chr$(10) & chr$(13) to force line breaks and carriage returns in order to format the text.
  Can the file be forced into the email body - maximum 30 lines of text - 2400 chars?


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/98e285ce/attachment.html>


More information about the User mailing list