<!-- Copyright (c) 2021 ActivePDF, Inc. --> <!-- ActivePDF Server 2013 --> <!-- Example generated 04/17/21 --> <!-- Example uses the .NET DLL which requires --> <!-- Coldfusion 8 or above --> <CFSCRIPT> // Get current path strPath = ExpandPath(".") & "\"; // Instantiate Object oSVR = CreateObject(".NET", "APServer.Server", "C:\Program Files\activePDF\Server\bin\APServer.Net35.dll"); // Add an email oSVR.AddEMail(); // Set server information oSVR.SetSMTPInfo("0.0.0.0", 25); oSVR.SetSMTPCredentials("john.doe", "activePDF", "asdfasdf"); // Set email addresses oSVR.SetSenderInfo("John Doe", "john.doe@asdidlwenra.com"); oSVR.SetReplyToInfo("John Doe", "john.doe@asdidlwenra.com"); oSVR.SetRecipientInfo("Jane Doe", "jane.doe@asdidlwenra.com"); oSVR.AddToCC("Jim Doe", "jim.doe@asdidlwenra.com"); oSVR.AddToBcc("Janice Doe", "janice.doe@asdidlwenra.com"); // Subject and Body oSVR.Set_EMailSubject("PDF Delivery from activePDF"); oSVR.SetEMailBody("Here is your PDF!", false); // Attachments - Binary attachments can be added with AddEMailBinaryAttachment oSVR.AddEMailAttachment(strPath & "x.pdf"); // Other email options oSVR.Set_EMailReadReceipt(false); oSVR.Set_EMailAttachOutput(true); // Convert the PostScript file into PDF results = oSVR.ConvertPSToPDF(strPath & "PS.ps", strPath & "email.pdf"); if(results.Get_ServerStatus() != "Success") { Error("ConvertPSToPDF", results, results.Get_ServerStatus()); } // If running multiple conversions in one instance: // One email can be removed before the next conversion oSVR.RemoveEMail("john.doe@activepdf.com"); // An attachment can be removed oSVR.ClearEMailAttachments(); // or all emails can be removed oSVR.ClearEMails(); // Release Object oSVR = 0; // Process Complete WriteOutput("Done!"); // Error Handling Function Error(method, oResults, errorStatus) { WriteOutput("Error with " & method & ": <br/>" & errorStatus & "<br/>" & oResults.Get_details()); } </CFSCRIPT>