Email with Local File Attachment (POST Method)

To attach a file stored on the device, use an HTTP POST request.The target file path is specified at the end of the command string using ,S:path.
The gateway automatically converts the data payload into an email attachment.

at#http=POST,https://contriveiot.eu/sm

?imei=$N14

&webid=$D13

&smtp_host=smtp.example.com

&smtp_port=587

&smtp_user=user@example.com

&smtp_pass=YOUR_PASS

&from=device@example.com

&to=recipient@example.com

&subject=Report

&body=Attached Data

,S:LOGS/answers.txt

Optional Parameters Omitted

  • from_name
  • to_name
  • reply_to
  • cc
  • bcc
  • body_plain
  • attach_name 1
  • attach_mime 2


1 Automatically defaults the filename to attachment.

2 Auto-detects MIME type: text → .txt  and binary → .bin.


Result recorded in LOG file

ok|1782720335|recipient@example.com