RE PAges to PDf- Rename to Mail Attachment

Does anyone have anything in this area… so far I have found this code for the convert and ready for rename. But id doubles up the names of the files on pdf convert and I’m not sure about attaching eah converted file to an email ready to go with a certain subject.
on open theFiles
tell application “Pages”
repeat with aFile in theFiles
open aFile
set docName to name of front document
– Remove .pages extension.
set prevTIDs to AppleScript’s text item delimiters
set AppleScript’s text item delimiters to “.pages”
– Add .pdf extension.
set docName to first text item of docName & “.pdf”
set AppleScript’s text item delimiters to prevTIDs
– Get folder that dropped file exists in.
tell application “Finder”
set sourceFolder to (container of aFile) as Unicode text
end tell – Finder
– Save file to folder that dropped file exists in.
set docPathAndName to sourceFolder & docName
save front document as “SLDocumentTypePDF” in docPathAndName
close front document
end repeat
end tell
end open