Is there a way to attach a file to an email withou...
# suitescript
s
Is there a way to attach a file to an email without creating the actual file?
j
make file, attach, delete file? NINJAEDIT!
s
hahaha. Yeah, that's what I was thinking. I was just hoping there would be a way without doing that
j
So I’m not actually sure what you mean by “without creating the actual file”
but I think you can create file and attach without saving to File Cabinet, if that’s what you are hoping to achieve
e.g. you could create a PDF of a transaction with render.transaction()
and attach that in your email.send()
thumbs up 1
you just need a File Object, not an actual file saved to the FC, AFAIK
s
Ok! I was thinking I needed a saved file
r
I believe this method might still save to the file cabinet on emails sent. If you are trying to avoid file cabinet size limitations. There are other ways as well.
s
@redfishdev What would those other methods be? @jen I tried just adding a file object, but it didn't add it sadly.
r
you can add to external system and link to that such as an S3 bucket on AWS. Or onedrive, etc. depends on your security needed.
j
This is odd, I’m pretty sure I’ve done this successfully.
122 Views