BE_SMTPAddAttachment

BE_SMTPAddAttachment ( { attachment ; contentType } )

Stores a list of attachment files from container fields as attachments for future BE_SMTPSend functions.

 

Version : 3.3
4.0 Changed the container parameter to attachment and added the contentType parameter.
4.0.2 : Renamed from BE_SMTP_AddAttachment

 

Parameters : 
attachment : a container field or a path to a file.
contentType : a mime content type, examples below.

 

Use this function to add attachments to an outgoing email that would normally be sent via BE_SMTPSend, but are not on disk.  You can add multiple attachments by calling this multiple times.  Once BE_SMTPSend is done it clears out the list of stored attachments regardless of the success of the Send.

Attachments are actually written to disk by the plugin, to the users temp folder, so this does require you to have access to a working temp folder ( defined by the OS ).

 

Result : 0 for success or ? for an error.  Check the BE_CurlTrace function for error details.

 

Notes : The content type is what is set in the mime type for emails.  So usually something like :

Content-Type: application/pdf; charset=UTF-8
Content-Type: text/plain; name="file.txt"
Content-Type: application/octet-stream; name="file.pdf"

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.