Pretty sure that the plugin expects the path in the OS format, whereas Get(TemporaryPath) gives the path in the FM syntax and also starts with a leading "/".
Thanks for your help! is there a way I could script this to work?
Of course. Look at the path as FM returns it and then look at the path as the OS shows it. Then it becomes a regular text manipulation exercise, suing Left(), Right() and Substitute() and perhaps other text functions.
In addition to the other replies, sometimes the BaseElements plugin wants the OS file path, but without the leading volume on it.
OS Path, using Get ( DocumentsPath ):
- /Macintosh HD/Users/<userName>/Documents/<fileName.pdf>
BE Path, using Get ( DocumentsPath ):
Hi everyone. Okay I seem to have got somewhere - I've been able to send one attachment by using this function to get the file path:
Substitute ( Get ( TemporaryPath ) & "TTTContract.pdf" ; Get ( SystemDrive ) ; "" )
and I have the attachment listed as:
Substitute ( Get ( TemporaryPath ) & "TTTContract.pdf" ; Get ( SystemDrive ) ; "" ) & Substitute ( Get ( TemporaryPath ) & "TTTInvoice.pdf" ; Get ( SystemDrive ) ; "" ) )
but now the email is not sending so I presume that there is something wrong with the way I have attached two attachments?
Thanks again in advance!
What does the list of attachments look like? I would probably put them into a variable, and use that variable in the BE_SMTP_Send function.
Set Variable [ $path ; ...your path... ]
Set Variable [ $path2 ; ...your path... ]
Set Variable [ $attachments ; List ( $path ; $path2 ) ]
Use $attachments in the BE_SMTP_Send function.
from the link I posted:
To get an example of the sorts of paths required, use the BE_SelectFile function, and choose a file with a known path.
1 of 1 people found this helpful
The BE_SMTP_AddAttachment ( $path) function should be called separately, before the SMTP send function. As per the docs : BE_SMTP_AddAttachment – BaseElements Plugin Help Centre it stores a list of attachments to send via the next SMTP Send call.
Don't use it as a parameter to the send call.