Skip to Content

Email Via ABSL Not Arriving


I've been following a blog on here, trying to get an email sent to myself via ABSL and it's not arriving, despite the test email (from business config) arriving. My code's as below, with identifiers such as the email addresses obfuscated:

import ABSL;
import AP.FO.Activity.Global;
import AP.Common.GDT as gdt;
import BASIS.Global;
import DocumentServices.Global;

var elementsofEmailActivity: elementsof EmailActivity;
var newEmail;

//EmailActivity: define party node.
var elementsofEmailActivityParty: elementsof EmailActivity.Party;
var instParty;
var textCollectionTypeCode = "10002";
var elementsofTextCollectionText: elementsof EmailActivity.TextCollection.Text;
var elementsofTextContent: elementsof EmailActivity.TextCollection.Text.TextContent;
var newTextCollection;
var newTextCollectionText;

//elementsofEmailActivity.Name.content = "Customer Invoice"; //The email subject.
//elementsofEmailActivity.Name.content = this.EmailSubject.Concatenate(" (Invoice ").Concatenate(this.InvoiceNumber.content.RemoveLeadingZeros()).Concatenate(")");
elementsofEmailActivity.Name.content = "Testing";
newEmail = EmailActivity.Create(elementsofEmailActivity);
elementsofEmailActivityParty.PartyKey.PartyID.content = ""; //The email address where you want to send it.
newEmail.MessageFromParty.PartyKey.PartyID.content = "";
var employeeResponsibleParty = newEmail.EmployeeResponsibleParty;
if (!employeeResponsibleParty.IsSet())
if (employeeResponsibleParty.IsSet())
    employeeResponsibleParty.PartyKey.PartyID.content = "7000001";


What's going wrong? The domain '' has been added to the list of sending domains allowed in E-mail and Fax Settings. My email address is the one used for all output in the system. If I send a test email it arrives, but not my one. What's going on?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 28, 2018 at 12:56 AM

    Hi Lewis,

    The BO EmailActivity, we just can do send email from the login user.

    newEmail = EmailActivity.Create(elementsofEmailActivity);
    elementsofEmailActivityParty.PartyKey.PartyID.content = "8000000021";     //To email partner ID
    newEmail.MessageFromParty.PartyKey.PartyID.content = "8000000000";    //login user partner ID

    Another way: use the Mail.Send, it can set the "From" and "To" email address.

    Best Regards,

    Benny Huang

    Add comment
    10|10000 characters needed characters exceeded

    • ////20180111 change from the object preview //if(mail_template.AttachInvoices == true) //{ //var attachment : pe:Attachment; // //if (ci.ProcessingTypeCode == "CCM") //{ //attachment.FileName="Customer Credit Memo "+ci.ID.content+".pdf"; //} //else if(ci.ProcessingTypeCode == "CDP") //{ //attachment.FileName="Customer Down Payment "+ci.ID.content+".pdf"; //} //else if(ci.ProcessingTypeCode == "CI") //{ //attachment.FileName="Customer Invoice "+ci.ID.content+".pdf"; //} // ////To simulate Preview //var docOutReq : elementsof DocumentOutputRequest; // //docOutReq.ReferenceObjectNodeID.content = ins_this.CustomerInvoiceUUID.content.ToString(); // UUID of root node. //docOutReq.ReferenceObjectNodeTypeCode.content = "229"; //Object Node Type code of Quote root node //docOutReq.ReferenceObjectTypeCode.content = "28"; //Object type code of Quote BO // //var docInst = DocumentOutputRequest.Create(docOutReq); // //var FTG : OutputRequestFormTemplateGroupCode; //FTG.content = "C41"; //Form Template Group Code for Quote // //docInst.RefreshDefaultOutputRequest(FTG); // //var DocItem = docInst.Item; //var docItem = docInst.Item.GetFirst(); // Or get based on lang, template code. // //docItem.Preview(); // Execute preview action //var binCont = docItem.ItemPreview.PreviewBinaryObject; // Get the binary object of PDF. // //attachment.Binary=docItem.ItemPreview.PreviewBinaryObject.content; // //docInst.Delete(); // //attachments.Add(attachment); // //}