January 27, 201312 yr 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
January 27, 201312 yr 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