Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Error 1506 trying to attache 2 PDF's to Email

Featured Replies

Hi All,

I have a script to either email or print data to a client. The data consists of a letter from one table and client Installation data from another table. The script runs fine until the Send Mail when I get the error 1506. It actually sends the mail but only attaches the first PDF.

 

Script;

 

Update_Letter_Current_Record_mail


Go to Layout [ “Installations” (Installations) ] Copy [ Installations::Inst_No ]


[ Select ]


Go to Related Record [ From table: “Clients”; Using layout: “Clients” (Clients) ] [ Show only related records ]


Go to Layout [ “Clients” (Clients) ] If [ Clients::Language_Pref="Eng" and Clients::Send_Mail="Yes" ]


Go to Layout [ “Update_Letter_Eng” (Letters) ]


New Record/Request


Paste [ Letters::Inst_No ] [ Select ]


Commit Records/Requests

 


Save Records as PDF [ File Name: “file:Mail_Folder/Update_Letter.pdf”; Current record ] [ Document - Title: "Update Letter"; Subject: "Installation Update"; Compatibility: Acrobat 7 and later ] [ Pages - Number Pages From: 1; Include: All pages ] [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ] [ Initial View - Show: Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ]


[ Restore; No dialog ]


Go to Related Record [ From table: “Installation_Items”; Using layout: “Installation_Items” (Installation_Items) ] [ Show only related records ]


Constrain Found Set [ Specified Find Requests: Find Records; Criteria: Installation_Items::Active_Flag: “=1” ] [ Restore ]


Sort Records [ Specified Sort Order: Installation_Items::ID; ascending ] [ Restore; No dialog ]


Save Records as PDF [ File Name: “file:Mail_Folder/Installation_Items.pdf”; Records being browsed ] [ Document - Title: "Installation_Items"; Subject: "Installation Update"; Compatibility: Acrobat 7 and later ] [ Pages - Number Pages From: 1; Include: All pages ] [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ] [ Initial View - Show: Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ]


[ Restore; Append; No dialog ]


Send Mail [ Send via SMTP Server; To: Clients::Email:; CC: "[email protected]"; Subject: "Installation Update Information"; Message: "We will contact you within the next week to update our records. Thank you for your assistance"; Attachment: “file:Mail_Folder/Update_Letter.pdf” OR “file:Mail_Folder/Installation_Items.pdf”; Name: "Oyseka"; Email Address: "[email protected]"; Reply-To Address: "[email protected]"; SMTP Server: "smtp.xpn.co.za"; Port: 25; Authentication Type: None ]


[ No dialog ] Exit Script [ ]

 

Edited as there was a redundant script step to set variable

You cannot attach more than one PDF to an email without using a plugin.

  • Author

Thank you for your response.

I had noticed in the script print, which I had not seen while writing the script on screen, that the send mail said "  Attachment: “file:Mail_Folder/Update_Letter.pdf” OR “file:Mail_Folder/Installation_Items.pdf”.

I had gone back to the script and changed it to append to the existing PDF with the same name which works fine  but I still get the error message. I have checked that the email address is just an email address without a full name enclosed in chevrons and I have run that excellent program from Savvydata, SMTP Send mail Interrogation but the error is stll there.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.