Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4317 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

This topic is 4317 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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