Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3599

Can't send an email from C4C

$
0
0

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;

  1. FormTemplateCode.content = "YTQHJCDCY_PUH";

PDF = OutputManagementUtilities.GetPDF(this,FormTemplateCode,FormTemplateLanguage);

 

//---------------------------------------------------------------------

// Create email

//---------------------------------------------------------------------

 

//Activity: Root node

varelActivityRootelementsofActivity;

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";

  1. docType.content = "10001";

binaryObject = PDF;

  1. instActivityAttachm.CreateFile(docType, docName, docAltName, docDesc, binaryObject );

 

  1. 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


Viewing all articles
Browse latest Browse all 3599


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>