How do I attach a document to an email notification?

John VanBruggen
Giga Guru

To start this off, there are a lot of threads that ask this question.   To clarify, I do not want to attach an attachment from current record, thus that include attachments checkbox won't do the job for me.  

We are wanting to send a particular PDF document (it is a static pdf that does not change and contains a checklist that the users are to follow) as an attachment in an email, not as a link to an attachment file.   Since we are wanting to actually attach the record, this code will not work...

template.print ( 'Attachment: <a href="/sys_attachment.do?sys_id=' + gr. sys_id + '">' + gr. file_name + '</a>\n ' ) ;

...as it is a link and not an attachment.

So, to my question, if I know the sys_id of the attachment that I want to include in an email notification, is there a mail script that I can use that will attach that particular file to the notification so that it will be sent with the email?

Thanks in advance for any assistance in this.

Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk
1 ACCEPTED SOLUTION

Jim Coyne
Kilo Patron

You mentioned there are a lot of similar threads, but have you looked at this post - Sending Documents in an Email Notification   It would seem to be what you are looking for.

 

View solution in original post

6 REPLIES 6

Community Alums
Not applicable

Hi, this link redirect is not working for me can you please update it?

I've updated it.  Thanks for letting me know.  It got messed up during the migration to the new site.

 

That being said, there is a newer post as well - TNT: Attaching Shared Documents to an Email Notification