Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Email with PDF attached coming from a specific folder


davidoz
 Share

Recommended Posts

Ok,

So I have a folder on my computer. That folder contains a lot of files having specific names related to my database (Product Beta.pdf, Product Alpha.pdf, ect...).

 

I want to create a script to send an email to specific clients who purchased a specific product (Alpha or Beta or else). Is there a way for me to create an email with an attachment of that file without having to create a container field that would contain the file to be send ?

 

What are the steps required ? I've managed to send the emails to the clients but cannot get the attachment to be send as well.

 

Thanks for your help.

Link to comment
Share on other sites

Assuming the rest of your Send Mail script step is set up properly (To, Subject, Body, etc)...

 

Set Variable [$PDFPath; "filewin:D:/PathTo/folder/OnYour/Computer/Product " & PurchaseRecord::AlphaOrBetaOrWhatever_Field & ".pdf"]

 

... (Obviously you use your real path, and whatever logic in your real formula will correctly yield the correct file name; in this example I'm assuming there's a table that contains the word "Alpha" or "Beta" or whatever)... then...

 

Send Mail [To=as is; Subject= as is; Message Body = as is; Attachment: $PDFPath; no dialog]

Link to comment
Share on other sites

Hi,

 

I've tried that solution by creating the variable

 

Set Variable [$Attach; "filewin:M:/WORK/Products 2011/Product " & Products::Ref_Item & ".pdf"]

Send Mail [To=Contact::Email; Subject= Products::Ref_Item; Message Body = "blabla"; Attachment: $Attach; no dialog]

 

But no success, it simply doesnt pick any file to attach.

Is there something I'm doing wrong ? The path is correct, the variable seems correct as well but still not working.

 

looking forward to hear from you.

regards

Link to comment
Share on other sites

Disregard my last message, i figured it out. it was a problem with the path

"filewin:/M:/WORK/ect...." I was just missing that "/" before the drive letter !

 

Thanks a lot

 

Hi,

 

I've tried that solution by creating the variable

 

Set Variable [$Attach; "filewin:M:/WORK/Products 2011/Product " & Products::Ref_Item & ".pdf"]

Send Mail [To=Contact::Email; Subject= Products::Ref_Item; Message Body = "blabla"; Attachment: $Attach; no dialog]

 

But no success, it simply doesnt pick any file to attach.

Is there something I'm doing wrong ? The path is correct, the variable seems correct as well but still not working.

 

looking forward to hear from you.

regards

Link to comment
Share on other sites

Yeah, I don't work with Windows anywhere near as often and I forget the nomenclature. We don't have drive letters. I can never remember if there's a slash before the drive letter.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use