Send Invoice email with pdf attachement through DI?

Hi all,
is it possible to send an Invoice email with pdf attachement through DI as it can be done through UI?
Best Regards,
Vangelis

Hi Vangelis,
I Don't think that the DI API has that functionality (but I am not sure).
However with .Net's System.Net.Mail it should be quite easy to build.
Good luck,
Johan

Similar Messages

  • Sending an email with pdf attachment in Ecc6

    we were in 4.6 c and recentely upgraded to ECC6. we have a program which we are sending email with pdf attachments. now it is breaking, we are able to display the pdf in the screen, but once it became the attachment , it is not going.
    we are running the program in forground and not reading the spool and sending it. any idea

    http://www.sap-img.com/abap/sending-email-with-attachment.htm
    Sending mail to an external maild with PDF attachment.
    Creating a PDF attachment and send it via Email
    Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface
    How to send a ttachment with email.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap-Sendthespooldatatoanemail+address.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/convertSpoolrequesttoPDFandsendase-mail
    Friend just have a look in the forum itself, there are many posts for ur query, you definetly get exact solution no need to wait for answers/solutions.
    All the best

  • CRM ONLINE 2013: On Approval Of Quotation, Run Report, Generate PDF and Send an Email With PDF as attachment

    Hi,
    I am using CRM ONLINE 2013.
    How to automate below process?
    1. On Approval Of Quotation, Run Report.
    2. Generate PDF.
    3. Send an Email With PDF as attachment.
    As i have gone through many forums for this topic, but creating a plugin code for generating Report PDF is not possible in CRM ONLINE.
    So, What is the alternate way to do this..?
    Thanks.

    This is my entire code mentioned below:-
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
        <script type="text/javascript">
            if (typeof (SDK) == "undefined")
            { SDK = { __namespace: true }; }
            SDK.JScriptRESTDataOperations = {
                _context: function () {
                    if (typeof GetGlobalContext != "undefined")
                    { return GetGlobalContext(); }
                    else {
                        if (typeof Xrm != "undefined") {
                            return Xrm.Page.context;
                        else { return new Error("Context is not available."); }
                _getServerUrl: function () {
                    var serverUrl = this._context().getServerUrl()
                    if (serverUrl.match(/\/$/)) {
                        serverUrl = serverUrl.substring(0, serverUrl.length - 1);
                    return serverUrl;
                _ODataPath: function () {
                    return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
                _errorHandler: function (req) {
                    return new Error("Error : " +
      req.status + ": " +
      req.statusText + ": " +
      JSON.parse(req.responseText).error.message.value);
                _dateReviver: function (key, value) {
                    var a;
                    if (typeof value === 'string') {
                        a = /Date\(([-+]?\d+)\)/.exec(value);
                        if (a) {
                            return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
                    return value;
                Create: function (object, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 201) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send(JSON.stringify(object));
                Retrieve: function (id, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 200) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                Update: function (id, object, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.setRequestHeader("X-HTTP-Method", "MERGE");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 204 || this.status == 1223) {
                                successCallback();
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send(JSON.stringify(object));
                Delete: function (id, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.setRequestHeader("X-HTTP-Method", "DELETE");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 204 || this.status == 1223) {
                                successCallback();
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
                    if (filter != null) {
                        filter = "?" + filter;
                    else { filter = ""; }
                    var req = new XMLHttpRequest();
                    req.open("GET", this._ODataPath() + type + "Set" + filter, true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 200) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                __namespace: true
        </script>
        <script type="text/javascript">
            //Create Email and link it with Order as Regarding field
            var Xrm;
            var email = new Object();
            var ownerID = "";
            var CustomerId = "";
            if (window.opener) { Xrm = window.opener.Xrm; }
            else if (window.parent) { Xrm = window.parent.Xrm; }
            //Get ownerid who send email of quotation to customer
            function GetOwnerID() {
                var owner = Xrm.Page.getAttribute("ownerid").getValue();
                ownerID = owner[0].id;
                var ownerName = owner[0].name;
                var entityType = owner[0].entityType;
                GetToEmailGUID();
            //Get customerid who receive email of quotation from owner
            function GetToEmailGUID() {
                var Customer = Xrm.Page.getAttribute('customerid').getValue();
                CustomerId = Customer[0].id;
                var CustomerName = Customer[0].name;
                var entityType = Customer[0].entityType;
                //if CustomerId is type of "Account" then get Primary Contact id of that account
                if (entityType == "account") {
                    var contact = Xrm.Page.getAttribute("customerid").getValue();
                    if (contact === null) return;
                    var serverUrl = Xrm.Page.context.getClientUrl();
                    var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
                    var req = new XMLHttpRequest();
                    req.open("GET", oDataSelect, false);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
                    req.onreadystatechange = function () {
                        if (req.readyState === 4) {
                            if (req.status === 200) {
                                var retrieved = JSON.parse(req.responseText).d;
                                CustomerId = retrieved.PrimaryContactId.Id;
                            else {
                                alert(this.statusText);
                    req.send();
            function CreateEmail() {
                GetOwnerID();
                email.Subject = "Email with Report Attachment";
                //Set The current order as the Regarding object
                email.RegardingObjectId = {
                    Id: Xrm.Page.data.entity.getId(),    //Get the current entity Id , here OrderId
                    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
                //Create Email Activity
                SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
            // Email Call Back function
            function EmailCallBack(result) {
                email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
                var activityPartyFrom = new Object();
                // Set the From party of the ActivityParty to relate an entity with Email From field
                activityPartyFrom.PartyId = {
                    Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                    LogicalName: "contact"
                // Set the "activity" of the ActivityParty
                activityPartyFrom.ActivityId = {
                    Id: result.ActivityId,
                    LogicalName: "email"
                // Now set the participation type that describes the role of the party on the activity).
                activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
                // Create the from ActivityParty for the email
                SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
                var activityPartyTo = new Object();
                // Set the From party of the ActivityParty to relate an entity with Email From field
                activityPartyTo.PartyId = {
                    Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                    LogicalName: "systemuser"
                // Set the "activity" of the ActivityParty  
                activityPartyTo.ActivityId = {
                    Id: result.ActivityId,
                    LogicalName: "email"
                // Now set the participation type that describes the role of the party on the activity).    
                activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
                // Create the from ActivityParty
                SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
            //ActivityParty From Callback
            function ActivityPartyFromCallBack(result) {
            //ActivityParty To Callback
            function ActivityPartyToCallBack(result) {
                GetReportId('ABM_Infotech_SalesQuote');
            //Create attachment for the created email
            function CreateEmailAttachment() {
                //get reporting session and use the params to convert a report in PDF
                var params = getReportingSession();
                //Email attachment parameters
                var activitymimeattachment = Object();
                activitymimeattachment.ObjectId = Object();
                activitymimeattachment.ObjectId.LogicalName = "email";
                activitymimeattachment.ObjectId.Id = email.ActivityId;
                activitymimeattachment.ObjectTypeCode = "email",
                    activitymimeattachment.Subject = "File Attachment";
                activitymimeattachment.Body = encodePdf(params);
                activitymimeattachment.FileName = "Report1.pdf";
                activitymimeattachment.MimeType = "application/pdf";
                //Attachment call
                SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
            //ActivityMimeAttachment CallBack function
            function ActivityMimeAttachmentCallBack(result) {
                var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
                var width = "800px";
                var height = "600px";
                window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
                // To open window which works in outlook and IE both
                //openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width,
    height, features);
            //This method will get the reportId based on a report name that will be used in            getReportingSession() function
            function GetReportId(reportName) {
                var oDataSetName = "ReportSet";
                var columns = "ReportId";
                var filter = "Name eq '" + reportName + "'";
                retrieveMultiple(oDataSetName, columns, filter, onSuccess);
            function retrieveMultiple(odataSetName, select, filter, successCallback) {
                var serverUrl = Xrm.Page.context.getServerUrl();
                var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
                var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
                if (select) {
                    odataUri += "$select=" + select + "&";
                if (filter) {
                    odataUri += "$filter=" + filter;
                $.ajax({
                    type: "GET",
                    contentType: "application/json; charset=utf-8",
                    datatype: "json",
                    url: odataUri,
                    beforeSend: function (XMLHttpRequest) {
                        XMLHttpRequest.setRequestHeader("Accept", "application/json");
                    success: function (data) {
                        if (successCallback) {
                            if (data && data.d && data.d.results) {
                                successCallback(data.d.results);
                            else if (data && data.d) {
                                successCallback(data.d);
                            else {
                                successCallback(data);
                    error: function (XmlHttpRequest, errorThrown) {
                        if (XmlHttpRequest && XmlHttpRequest.responseText) {
                            alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
            function onSuccess(data) {
                reportId = data[0].ReportId.replace('{', ").replace('}', ");
                CreateEmailAttachment(); // Create Email Attachment
            //Gets the report contents
            function getReportingSession() {
                var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
                var retrieveEntityReq = new XMLHttpRequest();
                var Id = Xrm.Page.data.entity.getId();
                var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
                quotationGUID = quotationGUID.replace('}', "");
                var reportName = "ABM_Infotech_SalesQuote"; //set this to the report you are trying to download
                var reportID = "751089AA-74B8-E211-B52F-D8D3855B253B"; //set this to the guid of the report you are trying to download
                var rptPathString = ""; //set this to the CRMF_Filtered parameter
                var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition
    attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
                retrieveEntityReq.open("POST", pth, false);
                retrieveEntityReq.setRequestHeader("Accept", "*/*");
                retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName="
    +
                                reportName + "&isScheduledReport=false&p:ABMFilteredQuote=" + strParameterXML;
                //remove the part starting from &p:salesorderid if your report has no parameters
                retrieveEntityReq.send(rptPathString);
                var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
                var ret = new Array();
                ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
                x = retrieveEntityReq.responseText.indexOf("ControlID=");
                ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
                return ret;
            var bdy = new Array();
            var bdyLen = 0;
            function concat2Bdy(x) {
                bdy[bdyLen] = x;
                bdyLen++;
            function encodePdf(params) {
                bdy = new Array();
                bdyLen = 0;
                var retrieveEntityReq = new XMLHttpRequest();
                var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
                "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
                "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
                retrieveEntityReq.open("GET", pth, false);
                retrieveEntityReq.setRequestHeader("Accept", "*/*");
                retrieveEntityReq.send();
                BinaryToArray(retrieveEntityReq.responseBody);
                return encode64(bdy);
            var StringMaker = function () {
                this.parts = [];
                this.length = 0;
                this.append = function (s) {
                    this.parts.push(s);
                    this.length += s.length;
                this.prepend = function (s) {
                    this.parts.unshift(s);
                    this.length += s.length;
                this.toString = function () {
                    return this.parts.join('');
            var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
            function encode64(input) {
                var output = new StringMaker();
                var chr1, chr2, chr3;
                var enc1, enc2, enc3, enc4;
                var i = 0;
                while (i < input.length) {
                    chr1 = input[i++];
                    chr2 = input[i++];
                    chr3 = input[i++];
                    enc1 = chr1 >> 2;
                    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                    enc4 = chr3 & 63;
                    if (isNaN(chr2)) {
                        enc3 = enc4 = 64;
                    } else if (isNaN(chr3)) {
                        enc4 = 64;
                    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
                return output.toString();
        </script>
        <script type="text/vbscript">
        Function BinaryToArray(Binary)
               Dim i
               ReDim byteArray(LenB(Binary))
               For i = 1 To LenB(Binary)
                     byteArray(i-1) = AscB(MidB(Binary, i, 1))
                     concat2Bdy(AscB(MidB(Binary, i, 1)))
             Next
              BinaryToArray = byteArray
       End Function     
        </script>
    </head>
    <body>
        <input type="button" onclick="CreateEmail();" value="Attach Report" />
    </body>
    </html>

  • External Send PO as email with PDF attachment not working

    hi,
    we are using ECC6, and in txn NACT, Processing routine we can use Sapscript External send > SAPFM06P > ENTRY_NEU > MEDRUCK > PDF and in MN04/5 i create Output record, and in SCOT my PO is ready for transmission from either ME21N/2 and ME9F - works well - email sent with pdf PO attached.
    <b>HOWEVER,</b> we have just created a SMARTFORM PO, and with similar settings, i cannot create External send OUTPUT!!! (Output failed in ME9F/ME23N) NACT settings External Send > /SMB40/FM06P > Z_MMPO_A > PDF
    In SCOT > SMTP > Internet X > Sapscript/SmartForm = PDF.
    Does special code need to be entered into Smartform to generate PDF email similar to Sapscript? Any code would be appreciated.
    regards Adam

    Hi,
    You need to build a code to create the Spool OTF output into PDF.
    This can be done in Print program, which converts the spool into PDF & sends a mail with PDF attachment.
    Please refer this sample program:
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Best regards,
    Prashant

  • Custome FM to create Email with PDF attachment

    Hi Experts,
    I am working in Smart form.  my requriment is to create a Custom Function module , for sending  email  with PDF attachment  to the customer. PDF is nothing but which ever I create smart form.
    How can I approach , please give me a suggestion or send me a sample code, if any one create.
    1. This FM should work like : convert form to PDF and send Email to particular customer.

    Hi,
    Steps to convert Smartform to PDF,
    1 Call smartform through FM SSF_FUNCTION_MODULE_NAME.
       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    2  Converting Smartform to OTF and in turn to PDF
       Set Following parameter in order to convert Smartform into OTF.
      gs_cparam-no_dialog = 'X'.   " Suppressing the dialog box
      gs_cparam-preview = 'X'.     " for print preview
      gs_cparam-getotf = 'X'.     " To get Output in OTF
        CALL FUNCTION g_fmodule
          EXPORTING
            control_parameters = gs_cparam
            output_options     = gs_outoptions
          IMPORTING
            job_output_info    = gt_otf_from_fm
          TABLES
            gt_final           = gt_final
         gt_otf[] = gt_otf_from_fm-otfdata [].
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'PDF'
            max_linewidth         = 132
          IMPORTING
            bin_filesize          = g_bin_filesize
          TABLES
            otf                   = gt_otf
            lines                 = gt_pdf_tab
        CHECK sy-subrc = 0.
        g_bin_filesize = g_bin_filesize + 1.
    Transfer the 132-long strings to 255-long strings
        LOOP AT gt_pdf_tab into gs_pdf_tab.
          TRANSLATE gs_pdf_tab USING ' ~'.
          CONCATENATE g_buffer gs_pdf_tab INTO g_buffer.
        ENDLOOP.
        TRANSLATE g_buffer USING '~ '.
        DO.
          gs_mess_att = g_buffer.
          APPEND gs_mess_att to gt_mess_att.
          SHIFT g_buffer LEFT BY 255 PLACES.
          IF g_buffer IS INITIAL.
            EXIT.
          ENDIF.
        ENDDO.
    3 For Sending Mail use following mail,
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = ls_doc_data
          put_in_outbox              = 'X'
          sender_address             = l_sender_address
          sender_address_type        = l_sender_address_type
          commit_work                = 'X'
        TABLES
          packing_list               = lt_packing_list
          contents_bin               = lt_attachment
          contents_txt               = lt_message
          receivers                  = lt_receivers
    I hope this could help you,
    Please let me know if any issue.
    Thanks & regards,
    ShreeMohan
    Edited by: ShreeMohan Pugalia on Jul 18, 2009 8:02 AM
    Edited by: ShreeMohan Pugalia on Jul 18, 2009 8:03 AM
    Edited by: ShreeMohan Pugalia on Jul 18, 2009 8:05 AM

  • Sending an Email with an attachment for all the Customers

    Hi friends,
    How can i send an email with an attachment to the customers email address.
    the attachment will be in doc format.
    the data which i am sending must be in a TABLE format
    withe 5 columns.
    Having an Header
    and each column with a column heading
    Please guide me.
    Thanks in Advance,
    Ganesh.

    http://www.sap-img.com/abap/sending-email-with-attachment.htm
    Sending mail to an external maild with PDF attachment.
    Creating a PDF attachment and send it via Email
    Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface
    How to send a ttachment with email.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap-Sendthespooldatatoanemail+address.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/convertSpoolrequesttoPDFandsendase-mail
    Friend just have a look in the forum itself, there are many posts for ur query, you definetly get exact solution no need to wait for answers/solutions.
    All the best

  • When I send an email with an attachment larger than 1 MB in iMail, the email takes forever to be sent.

    When I send an email with an attachment larger than 1 MB from iMail, the email gets suck in the sent folder.  This happens no matter if I am using wireless or using an ethernet connection. 

    Many email programs, including Mail, will send data up to a certain size.
    The good new - there are some solutions. You can compress the file and make the email much faster to send; you can download a free application like Compress, which also allows you to uncompress. Or, you can send your email via your webmail connection (your ISP, like ATT); if you manage your email through your desktop computer, the email should be sent just fine.
    Apple Mail is designed for smaller documents, well under 1mb.

  • Issue in sending the email with XL attachment in ECC version

    Hi,
    I have an issue with sending the email with XL attachment. My program is sending a mail to the receiver with XLS as attachment. Recently we have migrated from 4.6B to ECC version. Same code was worked in 4.6B.But it is not working in ECC version.When i try to open the attachment, i get a Dialog Box with the following message
    "The file is not in a recognizable format.
    1. if you know the file is from another program whih is incompatible with Microsoft excel,click cancel,then open this file in its original application
    2.If you suspect the file is damaged, click help for more information about solving theproblem.
    3.if you still want to see what text is contained in the file, click OK.Then click the text import wizard. "
    when i click OK, the excel sheet is opening with all required data.
    Can anyone kindly tell me why this is happening.
    I am also attaching part of the coding related to this requirement.
    *&      Form  BUILD_XLS_DATA_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM build_xls_data_table.
      DATA: w_total(13),
      w_clabs(13),
      w_cinsm(13),
      w_ceinm(13),
      w_cretm(13),
      w_cspem(13),
      w_cumlm(13),
      w_exp_date(8),
      w_v_totalp(13),
      w_min_rem(8),
      w_ersda(10),
      w_hsdat(10),
      w_vfdat(10),
      w_ship_date(10),
      w_plnmg(13),
       w_mhdrz(4).
      CLEAR: w_total, w_clabs, w_cinsm, w_ceinm, w_cspem, w_exp_date,
      w_v_totalp, w_min_rem, w_ersda, w_hsdat, w_vfdat, w_ship_date,
      w_plnmg, w_mhdrz.
      w_total = it_batch1-total.
      w_clabs = it_batch1-clabs.
      w_cinsm = it_batch1-cinsm.
      w_ceinm = it_batch1-ceinm.
      w_cspem = it_batch1-cspem.
      w_cumlm = it_batch1-cumlm.
      w_cretm = it_batch1-cretm.
      w_exp_date = it_batch1-exp_date.
      w_v_totalp = it_batch1-v_totalp.
      w_min_rem = it_batch1-min_rem.
      w_plnmg = it_batch1-plnmg.
      w_mhdrz = it_batch1-mhdrz.
      CONCATENATE it_batch1-ersda6(2) it_batch1-ersda4(2)
                  it_batch1-ersda+0(4) INTO w_ersda SEPARATED BY '.'.
      CONCATENATE it_batch1-hsdat6(2) it_batch1-hsdat4(2)
                  it_batch1-hsdat+0(4) INTO w_hsdat SEPARATED BY '.'.
      CONCATENATE it_batch1-vfdat6(2) it_batch1-vfdat4(2)
                  it_batch1-vfdat+0(4) INTO w_vfdat SEPARATED BY '.'.
      CONCATENATE it_batch1-ship_date6(2) it_batch1-ship_date4(2)
                  it_batch1-ship_date+0(4) INTO w_ship_date SEPARATED BY '.'
      CONCATENATE
      it_batch1-werks it_batch1-mtart it_batch1-matnr it_batch1-maktg
    it_batch1-prdha it_batch1-prctr it_batch1-ktext  it_batch1-dispo
      it_batch1-charg it_batch1-lgort it_batch1-herkl w_clabs
      w_cinsm w_ceinm w_cretm w_cspem
      w_cumlm w_total  it_batch1-meins  it_batch1-v_spr_unit
      w_v_totalp it_batch1-waers w_plnmg  it_batch1-meins
      w_ersda w_hsdat w_vfdat  w_exp_date
       w_ship_date  w_mhdrz  w_min_rem it_batch1-zlifer
       it_batch1-doknr it_batch1-dokar it_batch1-doktl  it_batch1-dokvr
               INTO L_STRING SEPARATED BY CON_TAB.
                  INTO l_string SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
      WHILE l_string <> space.
        CALL FUNCTION 'TEXT_SPLIT'
          EXPORTING
            length       = 255
            text         = l_string
            as_character = 'X'
          IMPORTING
            line         = it_attach
            rest         = l_string.
        IF l_string = space.
       CONCATENATE IT_ATTACH CON_CRET INTO IT_ATTACH.
          CONCATENATE it_attach cl_abap_char_utilities=>cr_lf INTO it_attach.
          APPEND it_attach.
          CLEAR it_attach.
        ELSE.
          APPEND it_attach.
          CLEAR it_attach.
        ENDIF.
      ENDWHILE.
    move l_string to it_attach .
    CONCATENATE it_attach cl_abap_char_utilities=>cr_lf INTO it_attach.
    APPEND it_attach.
    CLEAR it_attach.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          text
    -->  p1        text
    <--  p2        text
    FORM send_file_as_email_attachment.
      DATA:w_length TYPE i.
      DATA:  w_cnt TYPE i,
              w_sent_all(1) TYPE c,
              w_doc_data LIKE sodocchgi1,
              gd_error    TYPE sy-subrc,
              gd_reciever TYPE sy-subrc,
              t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
    w_doc_data-obj_langu = sy-langu.
    w_doc_data-obj_name  = 'SAPRPT'.
    w_doc_data-obj_descr = text-034 .
    w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
    DESCRIBE TABLE it_attach LINES w_cnt.
      DESCRIBE TABLE it_message LINES w_cnt.
      READ TABLE it_message INDEX w_cnt.
    w_length = STRLEN( it_attach ).
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_message ).
      w_doc_data-obj_langu  = sy-langu.
    w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = text-034.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
    ***Start of changes by 501507008 on 29.01.2009
      t_packing_list-obj_descr  = 'MAIL BODY'.
    ***End of changes by 501507008 on 29.01.2009
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  'XLS'.
      t_packing_list-obj_descr  =  text-034.
      t_packing_list-obj_name   =  'filename'.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      LOOP AT it_adr6.
        t_receivers-receiver = it_adr6-smtp_addr.
        t_receivers-rec_type = 'U'.
        t_receivers-com_type = 'INT'.
        t_receivers-notif_del = 'X'.
        t_receivers-notif_ndel = 'X'.
        APPEND t_receivers.
      ENDLOOP.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
         document_data              = w_doc_data
         put_in_outbox              = 'X'
         sender_address             = ' '
         sender_address_type        = ' '
         commit_work                = 'X'
       IMPORTING
         sent_to_all                = w_sent_all
       TABLES
         packing_list               = t_packing_list
         contents_bin               = t_attachment
         contents_txt               = it_message
         receivers                  = t_receivers
       EXCEPTIONS
         too_many_receivers         = 1
         document_not_sent          = 2
         document_type_not_exist    = 3
         operation_no_authorization = 4
         parameter_error            = 5
         x_error                    = 6
         enqueue_error              = 7
         OTHERS                     = 8.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data                    = w_doc_data
         put_in_outbox                    = 'X'
      commit_work                      = ' '
    IMPORTING
      sent_to_all                      =
      new_object_id                    =
    tables
            packing_list               = t_packing_list
            contents_bin               = t_attachment
            contents_txt               = it_message
            receivers                  = t_receivers
      contents_hex                     =
      object_para                      =
      object_parb                      =
       exceptions
         too_many_receivers               = 1
         document_not_sent                = 2
         document_type_not_exist          = 3
         operation_no_authorization       = 4
       parameter_error                  = 5
       x_error                          = 6
       enqueue_error                    = 7
       OTHERS                           = 8.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " SEND_FILE_AS_EMAIL_ATTACHMENT

    Hi,
    could you tell me which opeion should i select in SCOT under INT node. I have tried with diffrent options. but no luck.
    SAPscript/Smart Forms  - No Conversion
    ABAP List                     - No Conversion
    Business Object/Link     - No Conversion
    RAW Text                     - No Conversion

  • How to send a mail with PDF attachment

    Hello
    Good Day!
    We have a requirement to send the mail with pdf attachment. Pdf file will be remain same for all mails and it will be placed at server. We are on R12.4 and below is the database information :
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    Thanks a ton for your anticipated help!
    Thanks
    Gaurav

    The word URGENT is considered as rude in this forum.. Nobody here is getting paid for the ansers they are giving..
    Just have a look at These threads.Those will help you.

  • How to send an email with an attachment to the customers email address.

    Hi friends,
    How to send an email with an attachment to the customers email address.
    the attachment will be in doc format.
    Having an Header
    the data which i am sending must be in a TABLE format
    with 5 columns.
    and each column must have a column heading
    Please guide me.
    Thanks in Advance,
    Ganesh.

    *& Report  ZEMAIL_ATTACH                                               *
    *& Example of sending external email via SAPCONNECT                    *
    REPORT  ZEMAIL_ATTACH                   .
    TABLES: ekko.
    PARAMETERS: p_email   TYPE somlreci1-receiver .
    *Here get the values of mail from the table adn6 for the customer address.
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
          wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
      ebeln(10) TYPE c,
      ebelp(5)  TYPE c,
      aedat(8)  TYPE c,
      matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
      Retrieve sample data from table ekpo
      PERFORM data_retrieval.
      Populate table with detaisl to be entered into .xls file
      PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Populate message body text
      perform populate_email_message_body.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'DOC'
                                          'filename'
                                 changing gd_error
                                          gd_reciever.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM initiate_mail_execute_program.
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp aedat matnr
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekpo.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_XLS_DATA_TABLE
          Build data table for .xls document
    FORM build_xls_data_table.
      CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                 con_tab TYPE x VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
             INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
      LOOP AT it_ekpo INTO wa_charekpo.
        CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
                    wa_charekpo-aedat wa_charekpo-matnr
               INTO it_attach SEPARATED BY con_tab.
        CONCATENATE con_cret it_attach  INTO it_attach.
        APPEND  it_attach.
      ENDLOOP.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test ekpo records'.
      APPEND it_message.
    endform.                    " POPULATE_EMAIL_MESSAGE_BODY
    regards,
    venkat.

  • I am unable to send an email with an attachment I created in Pages.I have installed version 5.0.1

    I am unable to send an email with an attachment I created in Pages version 5.0.1. It also prevented me from sending out any other emails with or without  an attachment. I finally fixed my email so I could send out again but when I tried to send an attachment created in Pages it wouldn't allow it.  Can someone help me, please! Thanks!

    Pages 5 is having problems with GMail, Google and Yahoo. Dropbox may have fixed their problem with an update.
    Along with this problem and others, Apple has removed over 90 features from Pages 5.
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Archive/trash Pages 5 and rate/review it in the App Store, then get back to work.
    Peter

  • On my mac why does it take so long to send a Email with an attachment, on my mac why does it take so lone to send a Email with an attachment

    on my mac why does it take so long to send a Email with an attachment, on my mac why does it take so lone to send a Email with an attachment

    It depends on the size of the attachment and the speed of your internet connection.
    Next time you send an email with an attachment do these two things:
    In Apple Mail (I assume you are using Apple Mail), under the Window menu select Activity. Arrange the Activity window so you can see it.
    Then open the separate application located in the Utilities folder called "Activity Monitor" and arrange it so you can see it at the same time as the Activity window in Mail.
    In Activity Monitor program, select the tab labeled "Network." Watch the "Data sent/sec" portion. Then send your email, while watching the Mail Activity window and also the Activity Monitor program window Data sent/sec area.
    You should see the mail being sent with a progress bar in the Mail Activity window and also you should be able to see how many bytes/sec or KB/sec or MB/sec your internet connection is giving you in the Activity Monitor window.
    Example: my internet provider gives me about 20 Megabits per second download and 5 Megabits per second upload. To convert these to Megabytes per second (Activity Monitor shows things in bytes, not bits), simply divide by 10 (not the exact thing to do, but close enough). So I get 0.5 Megabytes per second upload speed. When I send a file that is 5 Megabytes in size, it takes about 10 seconds if I am getting the full upload bandwidth. If I am getting less than that (which sometimes happens), it will take proportionately more time. Either way, you can see what is happening with these two windows.
    If your internet provider is supposed to give you, say, 5 Megabits/sec upload (0.5 Megabytes/sec), but you see only say, 5 KB/sec (=0.005 Megabytes/sec), sent in Activity Monitor, then your emails are taking a long time because you are getting only abut 1/100 the speed you should be. You might want to check with your internet provider about that.

  • Sending an Email with Excel Attachment from Local directory

    Hi,
    I have a requirement : I want to send an email with an attachment which is exist on local  directory and currently I am using
    cl_bcs classes
    Thanks,
    Moderator message: Welcome to SCN!
    Moderator message: please do more research before asking, show what you have done yourself when asking.
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Aug 4, 2011 5:15 PM

    Hi,
    I have a requirement : I want to send an email with an attachment which is exist on local  directory and currently I am using
    cl_bcs classes
    Thanks,
    Moderator message: Welcome to SCN!
    Moderator message: please do more research before asking, show what you have done yourself when asking.
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Aug 4, 2011 5:15 PM

  • When I try to send an email with photo attachment to a contact a screen appears stating "the sender name is not recognized by the server " what do I need to change so this will not happen in the future. I am a novice!!!!!

    When I try to send an email with photo attachment on my iPad a screen appears which states " the sender is not recognized by the server" . What do I have to change so I can always send emails fr om my iPad with or without attachments. I am a novice!!!!!!

    If you purchased about 2 years ago new I am sure it is a Intel iMac. To find out what type of iMac you have just click on the Apple menu item in the finder and select about this Mac. I would check the ISP mail site and get the correct outgoing mail server info.   

  • Scheduling crontab to send an email with an attachement?

    (second post, 1st in wrong forum)
    Hey everyone,
    Does anyone know how to set up a command to send an email with an attachement? From what I've been informed so far, I inputed:
    0 22 * * * (cat mailtext; uuencode filename.txt filename.txt) | mail -s 'here is the backup log' [email protected]
    #The first filename.txt will also have the file path preceding it.
    I done all this and still no email. Do I have to enable smtp or set up the mail server?
    Any help would be much appreciated. Thanks!
    Xserve   Mac OS X (10.4.2)  

    What you're describing doesn't make any use of Automator.
    That being said, using command line "mail" does require that the Unix mail system be set up. This site has a utility for doing that.
    If you want to use Automator (the subject of this forum), you might try this:
    Create a new Automator workflow with these three actions:
    Get Specified Finder Items -- put your desired attachment(s) in the list
    New Mail Message -- fill in all appropriate fields
    Send Outgoing Messages
    Once you confirm that the workflow works, save it as an application. Then you can make it repeat with cron like you specified in your posting, but with the Automator task. E.g., if you saved it to the desktop, and with the name AutoSendDailyReport, edit your crontab:
    <pre>0 22 * * * ~/Desktop/AutoSendDailyReport.app/Contents/MacOS/AutoSendDailyReport</pre>
    Note that in this example, you'll need to be logged in at the time the cron job runs, so that the applications can run. It will automatically launch Mail, if not already running, and send the email.
    Alternatively, you can use iCal to schedule the task: set up a repeating event, with the alarm set to open the workflow app created above. Once again, you'll need to be logged in at the time the mail is to be sent.
    Titanium PowerBook   Mac OS X (10.4.4)  

Maybe you are looking for

  • Billing type in BAPI_SALESORDER_CREATEFROMDAT2 function Module

    Hi, Am creating sales orders through my program using the Function Module "BAPI_SALESORDER_CREATEFROMDAT2". I have data(fields) for which i have to create a Sales orders. I have mapped all the fields to the structures in the FM except Billing Type, I

  • INTER COMPANY SALES in IS MILLS

    Dear expert We have below Scenarios in intercompany sales plz guide me how to configure the by using IS mill functionalities Step 1 Company code plant A Procure the roll which manufactures in company code plant B for the same plant A create the STO w

  • Folder Item displayed in content area page?

    Is it possible to display an item in the folder portlet area (to keep navigator bar). I want the homepage to keep being displayed with the folder portlet in the same place only showing items description. thanks for help. jean-noel

  • Oracle 10g client connect to oracle 11g server

    Hi All, In my system, i have installed oracle 11g server(11.1.0.6.0). while i try to connect to this server by 10g client in my friends system,which is in the same network,it is showing ORA-12545: Connect failed because target host or object does not

  • Activating on a second computer

    I've transferred my Elements 7 from a desktop to a new laptop, but I'm told it's activated on two other computers already.   This is not so - how can I get this sorted out?