Send Email Task

Hi,
I used the SSIS send mail task ran it in BIDS and it worked fine!!!!, deployed it to SAP BPC but it did not like it.
I am now trying to use the SAP BPC send mail task but don't know what properties to fill in. Have searched the internet but the explanation is too brief.
Is there a book/manual/something that gives a detailed explanation of this task.
Have looked for an example but just can't find one.
If anyone has an example Please please let me know.
Thanks

You need to setup the appset parameters in BPC Administration under the Set AppSet Parameters option for the following:
SMTPAUTH
SMTPPASSWORD
SMTPPORT
SMTPSERVER
SMTPUSER
for the valid email server setting in your environment.
Then to see the properties of the SendMail task, once added to a DataManager package thru Organize package list you can select the Package, Modify it, select the SendMail task from the Task list and see the Properties of that task OR in VisualStudio select the SendMail task and view it's Properties.  Typically you need to pass the %USER% to the SendMail's MailUser property, but there are other properties available to set.
ALSO, the BPC User id submitting the package (%USER%)  needs to have an email address defined.
If you're using 5.1 sp3, I have discovered a bug with the SendMail task that generates an error, have entered a separate post and requested SAP ticket be entered documenting the issue.

Similar Messages

  • How to avoid repeated emails using send email tasks in package?

    Hi,
    I have package with two sqeuence containers which are not connected.So when I was using send email tasks I was getting repeated emails like 5 to 6 emails.So, can someone hep me on this.How can we avoid repeated emails.
    Regards,
    Sudha
    sudha

    See this example on preventing executing a task within an Event Handler:
    http://microsoft-ssis.blogspot.com/2014/07/prevent-events-executing-multiple-times.html
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • Full Result set - Send Email Task

    Hi Friends, 
    Please find below, my sample data and create table script
    Declare @Current_hour_test table
    Clinical_Document_ID INT IDENTITY(1,1) NOT NULL,
    Patient_First_Name varchar(20) NULL,
    Patient_Last_Name varchar(20) NULL,
    Patient_DOB date NULL,
    Submit_Date datetime NULL,
    Facility varchar(100) NULL
    Insert into @Current_hour_test
    Select 'Test','Test','01-01-88',getdate(),'Inpatient' UNION ALL
    Select 'Test','Test','01-01-88','01/15/14','Inpatient' UNION ALL
    Select 'Test','Test','01-01-88',getdate(),'Inpatient' UNION ALL
    Select 'Test','Test','01-01-88',getdate(),'Inpatient' UNION ALL
    Select 'Test','Test','01-01-88','02/20/14','Hospital' UNION ALL
    Select 'Test','Test','01-01-88',getdate(),'Inpatient' UNION ALL
    Select 'Test','Test','01-01-88',getdate(),'Inpatient' UNION ALL
    Select 'Test','Test','01-01-88',getdate(),'outpatient'
    Select 'www.google.com/page=' + convert(varchar,Clinical_Document_ID) LinkTest from @current_hour_test
    where
    clinical_document_ID IN (Select Clinical_Document_ID from @current_hour_test
    where submit_date between dateadd(hour,-1,getdate()) and getdate())
    Thus the gotten result set, I should send in a email by using send email task. Where I'm stuck is, the result is not a single row. How to send the total result set as email is my question 
    and also is there any way I can hyperlink the result such that the result can be clickable?
    - please mark correct answers

    Hyperlink you can, otherwise options are as an attached file, or if not too many lines in the body of the email e.g. a table.
    To have a hyperlink generated (HTML) see http://geekswithblogs.net/LifeLongTechie/archive/2011/02/02/using-ssis-to-send-a-html-e-mail-message-with-built-in.aspx just replace the code from table to a hyperlink, or you can use it for the table.
    Arthur My Blog

  • SSIS 2008 R2 - Send email task with error in body message?

    Hi there, I'm newbie to SSIS.
    In Control Flow, I've Execute SQL task -> Data Flow Task (wirh some CSV export from SQL task)-> Send email on failure as shown in below screenshot. How can I get FOR ANY error message in
    Email Body inside "Send Mail Task- Failure" in case of failure?
    I found few articles on the internet but I'm newbie to SSIS and I need some step-by-setp guildeline to do this. Any idea? Many Thanks.

    Hi KM IT,
    You can enable logging for the package, and redirect the error message to a text file, and then display the content of the text file in the email message body.
    When configuring the logging, you can enable the logging for the entire package or each Control Flow Task. For the step-by-step guidance, please see:
    http://learnsqlwithbru.com/2009/11/26/configure-logging-in-ssis-packages/ 
    Then, in the Send Mail Task, you can configure the "MessageSourceType" property to “File Connection”, and select the log file. Of course, you can attach the log file as an attachment of the email.
    If you have any questions, please feel free to ask.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Creation of instance of SELFITEM BO in send email task

    Hello,
    I would like to find out how the system creates the instance of the SELFITEM object.
    For example in SendTaskDescription method there is the workitem id fetched from variable object-key-workitemid, but I was not able to find out where the source of the value is.
    There is no related binding into the method/task, no explicit creation of object SELFITEM, but it works :). Are there any related hardcoded "miracles" in SAP standard or am I missing some points?
    Thank you very much,
    JJ

    Hi Ennrique,
    thank you for your answer, but it is not the answer for my question. There is NO binding into the email task which fills WIOBJECT_ID, but in the task method there is the code which is instance specific. So where is the instance created? 
    KR,
    JJ

  • Script task to convert output from a sql query into send mail task body formatting

    SSIS 2008R2 Version
    Code from script task
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_29dd6843bd6c4aee9b1656c1bbf55ba8.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            public void Main()
                Variables varCollection = null;
                string header = string.Empty;
                string message = string.Empty;
                Dts.VariableDispenser.LockForWrite("User::gsEmailMessage");
                Dts.VariableDispenser.LockForWrite("User::gsWebserviceName");
                Dts.VariableDispenser.LockForWrite("User::gsNoOfCallsInADay");
                Dts.VariableDispenser.LockForWrite("User::gsCalledBySystem");
                Dts.VariableDispenser.GetVariables(ref varCollection);
                //Set the header message for the query result
                if (varCollection["User::gsEmailMessage"].Value == string.Empty)
                    header = "Hi, Count is greater then 50 :\n\n";
                    //header = "Execute SQL task output sent using Send Email Task in SSIS:\n\n\n";
                    header += "----------------------------------------------------------------------------------------------------------------------" + "\n";
                    header += string.Format("{0}\t\t\t\t{1}\t\t{2}\n", "WebService Name", "No Of Calls In A Day", "Called By System");
                    header += "----------------------------------------------------------------------------------------------------------------------" + "\n";
                    varCollection["User::gsEmailMessage"].Value = header;
                //Format the query result with tab delimiters
                     message = String.Format("<HTML><BODY><P>{0}</P><P>{1}</P><P>{2}</P></BODY></HTML>",
                                            varCollection["User::gsWebserviceName"].Value,
                                            varCollection["User::gsNoOfCallsInADay"].Value,
                                            varCollection["User::gsCalledBySystem"].Value);
                varCollection["User::gsEmailMessage"].Value = varCollection["User::gsEmailMessage"].Value + message + "\n";
                Dts.TaskResult = (int)ScriptResults.Success;
    Above code will return data in below format and then i send this output in aemail using send mail task.
    Hi, count is greater then 50 :
    WebService Name                                                         
    No Of Calls In A Day                        Called By System
    WebServiceone                                                     1                             
    Internetbutiken
    WebServiceGetdetailstwo                                                  1                             
    Internetbutiken
    Servicenamethree                                                            2                             
    MOB
    As you can see above code is not in align as if we service name is shorter then 2nd column get disallign and its not look good.I need output should be like below.
    Hi, count is greater then 50 :
    WebService Name                                                         
    No Of Calls In A Day                        Called By System
    WebServiceone                                                              1                             
    Internetbutiken
    WebServiceGetdetailstwo                                              1                             
    Internetbutiken
    Servicenamethree                                                          2                             
    MOB
    Please suggest something...
    Thanks 
    SR_MCTS

    See code explained here
    http://microsoft-ssis.blogspot.in/2013/08/sending-mail-within-ssis-part-2-script.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
    This will not help.As I am not creating smtp connectin ,send from ,send to in script task.I am just creating email body from sql output.

  • Send Email from approval task form

    In my reusable workflow, I have added an approval action. Everything works perfectly. What I want is - When approver comes to approval form, he should be able to send notification email to the initiator (From that form) that he has started working on that document.
    What I have tried - I have added a button clicking on which will submit the form to initiator. 
    But it fails. possible reason - when I create a data connection in workflow's infopath form to submit form as email, I am getting following warning
    "Domain trust form templates cannot be sent as email attachments. to fix this problem, modify the form option to change the security level of form template to restricted".
    I also tried to update status field and wait for it to changes in workflow and send an email from sp designer workflow. it didn't work.
    Please help or suggest any other possible way to achieve this functionality (Send Email from approval task form to initiator).

    Hi mry,
    I could reproduce on my SharePoint 2013 on-premise based on your another
    post.
    Based on the the following article, SharePoint workflow cannot use the InfoPath form in restricted mode which doesn't allow the data connection, but as your image warning message shows sending InfoPath form as mail attachments will need restricted level.
    http://msdn.microsoft.com/en-us/library/office/ee526352.aspx
    You can consider to send a mail to initiator in "Whe a Task Completes" step when you click button approved/rejected, and construct the current task form link format as follow,
    http://sp/_layouts/15/WrkTaskIP.aspx?List=WorkflowTasksListGUID&ID=[%Current Task:ID%]
    Thanks
    Daniel Yang
    TechNet Community Support

  • Problem with sending email calendar task

    I am generating an email calendar task that works fine. Now my users want the organizer to receive an email back when user accepts/declines task. I must be missing something. Can anyone tell me how to turn on the "Request responses" ? Thank you. Below is my code:
    PROCEDURE ical_run (
       v_email varchar2,
       v_msg_subject varchar2,
       v_msg_text varchar2,
       v_rev_due_date varchar2
       )  IS
       l_ical_event VARCHAR2(32767); 
       messagE_no varchar2(5);
       v_from varchar2(80) := 'myemailaddress'; 
    BEGIN 
       l_ical_event := ical_event(  
          p_start_date      => TO_DATE(v_rev_due_date || '12:01AM','DD-MON-YYYYHH:MIAM')  
        , p_end_date        => TO_DATE(v_rev_due_date || '11:59PM','DD-MON-YYYYHH:MIPM')  
        , p_summary         => 'summary' 
        , p_organizer_name  => 'organizer_email' 
        , p_organizer_email => 'organizer_email'   
       send_ical_email(   
          p_to        => v_email  
        , p_from      => v_from 
        , p_subj      => v_msg_subject
        , p_body_html => v_msg_text
        , p_body_ical => l_ical_event  
    END;
    CREATE OR REPLACE FUNCTION TADDS.ical_event ( 
       p_start_date      IN DATE,
       p_end_date        IN DATE,
       p_summary         IN VARCHAR2,  
       p_organizer_name  IN VARCHAR2,  
       p_organizer_email IN VARCHAR2,   
       p_version         IN VARCHAR2 := NULL, 
       p_prodid          IN VARCHAR2 := NULL, 
       p_calscale        IN VARCHAR2 := NULL, 
       p_method          IN VARCHAR2 := NULL 
       RETURN VARCHAR2   
    AS    
       l_retval VARCHAR2(32767);  
       l_lf     CHAR(1) := CHR(10);  
    BEGIN 
       l_retval := '' 
          || 'BEGIN:VCALENDAR' || l_lf  
          || 'VERSION:' || NVL(p_version,'2.0') || l_lf  
          || 'PRODID:' || NVL(p_prodid,'-//Your company name//NONSGML ICAL_EVENT//EN') || l_lf  
          || 'CALSCALE:' || NVL(p_calscale,'GREGORIAN') || l_lf  
          || 'METHOD:' || NVL(p_method,'REQUEST') || l_lf  
          || 'BEGIN:VEVENT' || l_lf  
          || 'SUMMARY:' || p_summary || l_lf  
          || 'ORGANIZER;CN="' || p_organizer_name || '":MAILTO:' || p_organizer_email || l_lf  
          || 'DTSTART:' || TO_CHAR(p_start_date,'YYYYMMDD') || 'T' || TO_CHAR(p_start_date,'HH24MISS') || l_lf  
          || 'DTEND:' || TO_CHAR(p_end_date,'YYYYMMDD') || 'T' || TO_CHAR(p_end_date,'HH24MISS') || l_lf  
          || 'DTSTAMP:' || TO_CHAR(SYSDATE,'YYYYMMDD') || 'T' || TO_CHAR(SYSDATE,'HH24MISS') || l_lf  
          || 'UID:' || RAWTOHEX(SYS_GUID()) || '@yoururl.com' || l_lf  
          || 'STATUS:NEEDS-ACTION' ||  l_lf  
          || 'END:VEVENT' || l_lf  
          || 'END:VCALENDAR';  
       RETURN l_retval;  
    END ical_event;
    PROCEDURE send_ical_email (  
       p_from      IN VARCHAR2  
    , p_to        IN VARCHAR2  
    , p_subj      IN VARCHAR2  
    , p_body_html IN VARCHAR2  
    , p_body_ical IN VARCHAR2  
    AS 
       l_connection UTL_SMTP.CONNECTION;  
       l_mail_serv  VARCHAR2(50) := 'nwo22';  
       l_mail_port  PLS_INTEGER := '25';  
       l_lf         CHAR(1) := CHR(10);  
       l_msg_body   VARCHAR2(32767);  
    BEGIN 
       l_msg_body :=  
             'Content-class: urn:content-classes:calendarmessage' || l_lf  
          || 'MIME-Version: 1.0' || l_lf  
          || 'Content-Type: multipart/alternative;' || l_lf  
          || '  boundary="----_=_NextPart"' || l_lf  
          || 'Subject: ' || p_subj || l_lf   
          || 'Date: ' || TO_CHAR(SYSDATE,'DAY, DD-MON-RR HH24:MI') || l_lf  
          || 'From: <' || p_from || '> ' || l_lf   
          || 'To: ' || p_to || l_lf   
          || '------_=_NextPart' || l_lf  
          || 'Content-Type: text/plain;' || l_lf  
          || '  charset="iso-8859-1"' || l_lf  
          || 'Content-Transfer-Encoding: quoted-printable' || l_lf  
          || l_lf  
          || 'You must have an HTML enabled client to view this message.' || l_lf  
          || l_lf  
          || '------_=_NextPart' || l_lf  
          || 'Content-Type: text/html;' || l_lf  
          || '  charset="iso-8859-1"' || l_lf  
          || 'Content-Transfer-Encoding: quoted-printable' || l_lf  
          || l_lf  
          || p_body_html || l_lf
          || l_lf  
          || '------_=_NextPart' || l_lf  
          || 'Content-class: urn:content-classes:calendarmessage' || l_lf  
          || 'Content-Type: text/calendar;' || l_lf  
          || '  method=REQUEST;' || l_lf  
          || '  name="meeting.ics"' || l_lf  
          || 'Content-Transfer-Encoding: 8bit' || l_lf  
          || l_lf  
          || p_body_ical || l_lf  
          || l_lf  
          || '------_=_NextPart--';  
       l_connection := utl_smtp.open_connection(l_mail_serv, l_mail_port);  
       utl_smtp.helo(l_connection, l_mail_serv);  
       utl_smtp.mail(l_connection, p_from);  
       utl_smtp.rcpt(l_connection, p_to);  
       utl_smtp.data(l_connection, l_msg_body);  
       utl_smtp.quit(l_connection);  
    END send_ical_email;Edited by: user8116955 on Jul 28, 2009 11:02 AM

    In article <[email protected]>, Scarab wrote:
    > For example I`ve got [email protected], [email protected],
    > [email protected] accounts in my GW system. I`ve got [email protected]
    > account on non-GroupWise system. I`d like to have group alias to send
    > emails simulateusly to [email protected], [email protected],
    > [email protected] and [email protected] and group alias must be in
    > example.com domain. That`s why I configured [email protected] alias in
    > non-GroupWise system but it doesn`t work with GroupWise IMAP.
    >
    Now we are even more confused
    - system GW knows itself and answers for example.com
    - system other knows itself and answers for __________?
    You used example2.com in your above which is different from what you
    started out with. And now you are mentioning IMAP that you haven't
    mentioned at all before. Perhaps you are writing faster than you are
    thinking and missing getting the key data into here, and that makes it
    difficult for us to constructively help you.
    Andy Konecny
    Knowledge Partner (voluntary SysOp)
    KonecnyConsulting.ca in Toronto
    Andy's Profile: http://forums.novell.com/member.php?userid=75037

  • Send email button on task detail

    How do I disable the send email button on the task detail page?

    Check this thread:
    Re: removing of unused buttons on detail page.

  • Send email through human task in bpel

    hi everybody,
    I am badly stuck in sending email through human task using bpel.
    I have used reminder facility and enabled send email in .task file.but no email
    is sent so anyone please help me out and please provide me with full detailed solution what I have to do like change any xml file setting etc.
    Also I was trying to send email using email activity by changing the ns_emails.xml in .........bpel/systems/services/config & in .......integration/esb/config but I was not succeeded. So please provide me with complete solution like what parameters to pass in smtp server,port no,protocols etc and which file to change in which directory. my work is pending just because of this.
    I would be very grateful to you.
    thanks in advance.
    mansoor.

    Hi mansoor,
    <EmailAccounts xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"
    EmailMimeCharset=""
    NotificationMode="EMAIL">
         <EmailAccount>
              <Name>Default</Name>
              <GeneralSettings>
                   <FromName>BPEL POC</FromName>
                   <FromAddress></FromAddress>
              </GeneralSettings>
              <OutgoingServerSettings>
                   <SMTPHost>mail.oracle.com</SMTPHost>
                   <SMTPPort>25</SMTPPort>
              </OutgoingServerSettings>
              <IncomingServerSettings>
                   <Server>mail.oracle.com</Server>
                   <Port>993</Port>
                   <Protocol>IMAP</Protocol>
                   <UserName>xxxxxx</UserName>
                   <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService"></Password>
                   <UseSSL>false</UseSSL>
                   <Folder>Inbox</Folder>
                   <PollingFrequency>1</PollingFrequency>
                   <PostReadOperation>
                   <MarkAsRead/>
                   </PostReadOperation>
              </IncomingServerSettings>
         </EmailAccount>

  • Send Email using Execute SQL Task??????

    I need to send the bad records in the data flow.  I am attempting to do this using Execute SQL Tasks.  Please give me steps I need to accomplish this.  I have not set any variables up yet, assuming I need too.

    Just add a Send mail Task (or Script Task if using gmail etc which requires authentication) and pass the file as an attachment. Make sure you've a step (Script Task) to check if file length > 0 (ie file has records) before you link it to Send mail Task
    ie use a conditional precedence constraint (Expression And Constraint option)
    See these links for more details
    http://dwteam.in/send-mail-in-ssis-using-gmail/
    http://www.mssqltips.com/sqlservertip/1753/sending-html-formatted-email-in-sql-server-using-the-ssis-script-task/
    https://www.simple-talk.com/sql/ssis/working-with-precedence-constraints-in-sql-server-integration-services/
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • * Can We Send Email Notifications Only using User Task in Oracle BPM ?? *

    Hi All,
    Can we send any email notification to initiator, only from Oracle BPM User / Human task without using any notification activity.
    Is it possible to send email notifications using BPM User task alone.
    Any Help appreciated.
    Regards
    Satya

    Hi Satya,
    To send an email to the person who initiated the work item instance in the process when the instance reaches a human task:
    1. Ensure that the id of person who initiated the instance is stored in the process predefined variable called "creator".
    2. In the Interactive activity's input data mapping, map this "creator" process predefined variable to the corresponding "creator" attribute in the human task's execData.
    3. Open the human task -> click the "Notification" tab -> click the "+" icon in the upper right -> on the new row added to the bottom of the list, leave the task status dropdown set to "Assign" and change the recipent (the middle column) to "Initiator".
    Dan

  • Cannot send email from an iPhone to a Outlook group.

    Hi,
    My question is simple and I'd like an exactly same answer : Can iPhone users send emails from their iPhone's to one or more groups created in Outlook?
    This is my situation: our organization is using iPhone to provide email, calendar, contact, task etc. to some of their employees. We are using Airwatch MDM Agent on user's iPhone because we have an Airwatch server in place. I have an user and she has an iPhone 5 and she has created some groups in Outlook but these groups are not reflected in her Contacts in the iPhone. I have update her phone with the latest update, although I was almost sure that this was not the issue, then I've found some interesting posts on internet saying that this was a known problem for the users with the previous iOS but I thought this might has been corrected with the iOS, apparently not.
    Also I've tried ''the trick'' that is posted on several forums with the iCloud but neither so it's working. I am looking for a straight answer, if this works or not on iPhone's?
    Thanks,
    Sebastian.

    There indeed ARE apps in the app store that will do what you want.  Just search and find the one that best fits your needs.

  • Cannot send email via ActiveSync when user connect from Internet (Exchange 2010 SP3 RU5)

    Hi All. 
    This is the first time I encounter this kind of issue, whenever user connect from the internet they cannot send email from their Phone or Windows Mail App, but they can retrieve email 
    But when they connect from Internal Network they can send email. I already test ActiveSync from internet using www.testexchangeconnectivity.com and it pass all tests. 
    I also check the Firewall and all the necessary ports already opened (we even open all ports) , the default TTL on the firewall 3600 second. 
    From what I read ActiveSync use some kind of HTTP POST or in MS terminology "PING" command, but still have no idea what kind of configuration that should be made to the Firewall so it can pass this "PING" command. Because from what I
    see in Android Logcat the problem always related to this PING command 
    10-07 08:12:38.714 I/Exchange(31971): Interrupt with reason 1
    10-07 08:12:38.714 I/Exchange(31971): Ping task ending with status: -1
    10-07 08:12:38.904 D/Exchange(31971): created outputstream
    10-07 08:12:39.204 W/Exchange(31971): IOException sending mail
    10-07 08:12:39.204 E/Exchange(31971): Generic error for operation SendMail: status 200, result -100
    10-07 08:12:39.204 W/Exchange(31971): Aborting outbox sync for error -99
    10-07 08:12:39.274 I/Exchange(31971): Ping task starting for 3
    10-07 08:12:39.304 D/SyncManager(644): failed sync operation [email protected] u0 (com.android.exchange), com.android.email.provider, USER, latestRunTime 71219435, EXPEDITED, reason: 10040, SyncResult: stats [ numIoExceptions: 1]
    10-07 08:12:39.304 D/SyncManager(644): not retrying sync operation because SYNC_EXTRAS_DO_NOT_RETRY was specified [email protected]  u0 (com.android.exchange), com.android.email.provider, USER, latestRunTime 71220078, EXPEDITED, reason: 10040

    Hi ronaldosy,
    How about the work flow of Outlook or OWA on PC internally/externally?
    If only phone has this issue, I suggest ask ActiveSync Forum for help so that you can get more professional suggestions. For your convenience:
    http://social.technet.microsoft.com/Forums/exchange/en-US/home?forum=exchangesvrmobility
    Best Regards,
    Allen Wang

  • Sending Email using cl_bcs from a badi implementation

    Hi,
    I have written my code to send Email, inside AFTER_SAVE method of BADI Implementation of DOCUMENT_MAIN01.
    Now this method of cl_bcs requires COMMIT WORK for the mail to be sent. And inside BADI implementation, we cannot write a COMMIT statement.
    What is a workaround for this? While going through few other posts, I came across remote enabled FMs.
    Is that the only way? Can I use some additions like STARTING NEW TASK etc. Following is the call used in case of cl_bcs:
       CALL METHOD G_REF_SEND_REQUEST->SEND(
              EXPORTING
                I_WITH_ERROR_SCREEN = 'X'
             RECEIVING
                RESULT              = G_SENT_TO_ALL ).
    I also tried using SO_NEW_DOCUMENT_SEND_API1 STARTING NEW TASK and it works fine. But the subject length is a constraint their.
    Please suggest.
    Thanks in advance.

    Hi friend.
    *& Report  ZTEST_273068_EMAIL_CL_BCS
    REPORT  ZTEST_273068_EMAIL_CL_BCS.
    CONSTANTS:
        gc_subject TYPE so_obj_des VALUE 'ABAP Email with CL_BCS',
        gc_raw     TYPE char03 VALUE 'RAW'.
      DATA:
        gv_mlrec         TYPE so_obj_nam,
        gv_sent_to_all   TYPE os_boolean,
        gv_email         TYPE adr6-smtp_addr,
        gv_subject       TYPE so_obj_des,
        gv_text          TYPE bcsy_text,
        gr_send_request  TYPE REF TO cl_bcs,
        gr_bcs_exception TYPE REF TO cx_bcs,
        gr_recipient     TYPE REF TO if_recipient_bcs,
        gr_sender        TYPE REF TO cl_sapuser_bcs,
        gr_document      TYPE REF TO cl_document_bcs.
      TRY.
          "Create send request
          gr_send_request = cl_bcs=>create_persistent( ).
          "Email FROM...
          gr_sender = cl_sapuser_bcs=>create( sy-uname ).
          "Add sender to send request
          CALL METHOD gr_send_request->set_sender
            EXPORTING
              i_sender = gr_sender.
          "Email TO...
          gv_email = '[email protected]'.
          gr_recipient = cl_cam_address_bcs=>create_internet_address( gv_email ).
          "Add recipient to send request
          CALL METHOD gr_send_request->add_recipient
            EXPORTING
              i_recipient = gr_recipient
              i_express   = 'X'.
          "Email BODY
          APPEND 'Hello world! My first ABAP email!' TO gv_text.
          gr_document = cl_document_bcs=>create_document(
                          i_type    = gc_raw
                          i_text    = gv_text
                          i_length  = '12'
                          i_subject = gc_subject ).
          "Add document to send request
          CALL METHOD gr_send_request->set_document( gr_document ).
          "Send email
          CALL METHOD gr_send_request->send(
            EXPORTING
              i_with_error_screen = 'X'
            RECEIVING
              result              = gv_sent_to_all ).
          IF gv_sent_to_all = 'X'.
            WRITE 'Email sent!'.
          ENDIF.
          "Commit to send email
          COMMIT WORK.
          "Exception handling
        CATCH cx_bcs INTO gr_bcs_exception.
          WRITE:
            'Error!',
            'Error type:',
            gr_bcs_exception->error_type.
      ENDTRY.
    Just Execute it.
    Regards,
    Thrimu

Maybe you are looking for

  • SOLVED VISTA JAVA 1.6.X 1.6.15 BROKEN JAVA CONSOLE IE8/FIREFOX HANGS

    I recently inherited a problem where JAVA was broken on Vista Home Premium whenever you hit the java test page www.*java*.com/en/download/help/*test*vm.xml* the browser for both IE8 and FireFox 3.5.2 would just hang which required a forced kill, tryi

  • Certificate problem on https

    Hi, I faced with certificate read problem at .NET side. The program is that HttpListener Context cannot resolve the certificate that has been sent through XI. Please find the problematic source code, below.             try                 Console.Wri

  • Java interpreating problem

    I am using java 4 version the problem is :when i want to run any class file then is send a exception class not found so i am using to avoid this way java MyFile // ERROR java -classpath current_dir MyFile //CORRECT How i avoid to use of -classpath He

  • Create a PDF missing drawing elemets

    When I select Save & Send - Create PDF, most of the background in my Visio drawing is missing. It looks fine in print preview, prints fine on my printer and also prints fine when using the Adobe PDF print driver.

  • MOH not working with CTIOS

      The music on hold is not playing when agent is logged in to CTIOS and putting the customer on hold for an incoming call. If we put a call on hold from IP Phone normally we can hear the music on hold or even if the agent is logged in ctios and makes