Hi pros,
I would C4C to send an email with a generated PDF form. Unfortunatelly I am stuck at the point of sending an email. I used this links as an example
http://scn.sap.com/docs/DOC-49821
http://scn.sap.com/thread/3476803
I can send a test email using "fax and email settings" from Business-Configuration, but none of my emails are being sent.
This is the code I used to send email with one PDF file as attachment.
//------------------------------------------------------------------------
// Create PDF
//------------------------------------------------------------------------
varFormTemplateLanguage = "E";
varPDF : BinaryObject;
varFormTemplateCode : OutputRequestFormTemplateCode;
- FormTemplateCode.content = "YTQHJCDCY_PUH";
PDF = OutputManagementUtilities.GetPDF(this,FormTemplateCode,FormTemplateLanguage);
//---------------------------------------------------------------------
// Create email
//---------------------------------------------------------------------
//Activity: Root node
varelActivityRoot : elementsofActivity;
varinstActivity;
…. (Full text in the file in the attachment)
// Create an attachment of type "Link"
instActivityAttachm = instActivity.AttachmentFolder.Create();
vardocType : GlobalDataTypes:DocumentTypeCode;
varbinaryObject : BinaryObject;
vardocDesc : GlobalDataTypes:Description;
vardocName : GlobalDataTypes:LANGUAGEINDEPENDENT_Name;
vardocAltName : GlobalDataTypes:LANGUAGEINDEPENDENT_Name;
varbin : BinaryObject.content;
docName = "test1.pdf";
- docType.content = "10001";
binaryObject = PDF;
- instActivityAttachm.CreateFile(docType, docName, docAltName, docDesc, binaryObject );
- instActivity.Send(true);
Even thouth the activity does not bring any error messages, I haven’t received any letters.
What should I chaneg to be able to send an email? Or how can I debug this code?
Best regards,
Nadezhda Rukavishnikova