Changes between Version 18 and Version 19 of Docs/825gen2/Dev/Networking/SendEmail


Ignore:
Timestamp:
02/29/24 12:58:37 (9 months ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/825gen2/Dev/Networking/SendEmail

    v18 v19  
    155155[[Image(825test_email.png)]]
    156156
     157To send an image attachment modify the message.txt
     158{{{
     159From: wilsonwareapps@gmail.com
     160To: dwilson@cardet.com
     161Subject: Test email from 825
     162MIME-Version: 1.0
     163Content-Type: multipart/mixed; boundary="MyBoundaryString"
     164
     165
     166--MyBoundaryString
     167Content-Type: text/plain
     168Content-Transfer-Encoding: 7bit
     169
     170Test 12345
     171ABCD
     172
     173--MyBoundaryString
     174Content-Type: image/jpeg
     175Content-ID: <image11>
     176Content-Transfer-Encoding: base64
     177
     178}}}
     179
     180Note that there has to be a blank line at the end of the file
     181
     182Encode the jpeg image into base64 such as:
     183{{{
     184base64 /usr/share/apache2/default-site/htdocs/images/v000011_1.jpg /tmp/attachment
     185}}}
     186
     187Send the email.
     188
     189{{{
     190cat message.txt /tmp/attachment | msmtp -t
     191}}}
     192
    157193We may create or find a library to generate mime encoded emails from application code.
    158194