Sending mails via workflow..

Hi All,
I have a requirement in my service request.. when I change the status of the request a mail should be send to the intended recepient.
How to make this possible, Is it possible via calling an FM or else some settings in the workflow / Actions ??..
Thanks & Regards, Sudeep..

hi Sudeep,
based on my experience, you can achieve it via 2 way :
1. action
2. workflow
i prefere the option 1 via action.
in order to do that then you need to configure the action profile for your transaction.
add an action definition with processing type 'Smart Form Mail' or 'Calling Method'.
after that you need to modify some BADI to send the mail.
the function module that can be used for sending e-mail is SO_DOCUMENT_SEND_API1
hopes it helps
cheers

Similar Messages

  • Cant send Mails via Workflow CRM 2015

    Hi,
    I have two workflows for Cases ... in booth I'm trying to send Mails. In the on it works fine. In the other I'm getting the following Error:
    [Recipient is Contact or Responsible Contact]
    Plugin Trace:
    [Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.SendEmail]
    [SendEmailStep3: Send Mail To Responsible]
    Error Message:
    Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Workflow.Services.SendEmailActivityService.<>c__DisplayClass1.<SendEmailInternal>b__0(IOrganizationService sdkService)
       at Microsoft.Crm.Workflow.Services.ActivityServiceBase.ExecuteInTransactedContext(ActivityDelegate activityDelegate)
       at Microsoft.Crm.Workflow.Services.SendEmailActivityService.ExecuteInternal(ActivityContext executionContext, SendEmail sendEmail)
       at Microsoft.Crm.Workflow.Services.SendEmailActivityService.Execute(ActivityContext executionContext, SendEmail sendEmail)
       at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
       at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
    Any ideas what I can do?
    Thanks for your help
    EDIT: the first workflow is from the 2013 Version .. the second not working prozess is buildet in 2015

    Hello Mcgum,
    Though I am not a techie :(, I guess this is due to some privilege issue. Check if the current user is enabled to send emails on behalf of other user.
    I hope it should work.
    Regards, Abhishek Bakshi If you find this post helpful then please Vote as Helpful and Mark As Answer. Check my blog on https://mydynamicscrmblog.wordpress.com/

  • Sending mail from workflow or Updating container from FM

    Dear friends,
    I'm new to work flow.
    My requirement: send mail from workflow to a user after dead line is missed I do not want to use messages in 'Latest end' tab. I want to send mail.
    The mail id of the user is determined in the previous step using a FM. How do I use this mail id to send the mail. I thought of using 'Rule' option in 'Send Mail' (and use same FM)but thats not possible. In that case how do I pass the mail id value to the WF container from the FM?
    I also tried this idea:
    created a task with BOR object SELFITEM, method 'SENDTASKDESCRIPTION' .
    *in an activity step used this task and filled the 'Rule' option in notification tab appropriately
    *in this case the WF goes into an error '.....error executing 'sendtaskdescription' .....'
    *i would prefer using the activity step because, the mail has to be sent after a delay
    Is there any other simple method to do this?
    My problem would be solved even if someone can show me how to transfer values from a FM into a WF container.
    Can someone please explain?

    Hi,
    => To get the deadline worked via programming, you can write your own logic. In current case,
    1. Create a custom function, having proper input and output parameters like End Time to wait if in case you have maximum of 2 days of wait.
    The total wait time is calculated from the Endtime, which is input to function module.  From the Endtime, the start date and end date are calculated and then the difference between the two dates is counted as total wait time.
    Here at the most 2 days of wait time is calculated.
    * Local parameters
      DATA: LV_UTCSTART TYPE /SDF/CMO_TSTMP,
            LV_UTCEND   TYPE /SDF/CMO_TSTMP,
            LV_SECOND   TYPE /SDF/CMO_SEC,
            LV_ENDDATE  TYPE SY-DATUM,
            LV_STR TYPE STRING.
      IF ENDTIME >= SY-UZEIT AND ENDTIME <= '235959'.
    *   Today's date
        LV_ENDDATE = SY-DATUM.
      ELSE.
    *   Tomorrow's date
        LV_ENDDATE = SY-DATUM + 1.
      ENDIF.
    * Get the Start Time for function module
      CONCATENATE SY-DATUM SY-UZEIT INTO LV_STR.
      MOVE LV_STR TO LV_UTCSTART.
      CLEAR LV_STR.
    * Get the End Time for function module
      CONCATENATE LV_ENDDATE ENDTIME INTO LV_STR.
      MOVE LV_STR TO LV_UTCEND.
      CLEAR LV_STR.
    * Get the total wait time in seconds
      CALL FUNCTION '/SDF/CMO_TIME_DIFF_GET'
        EXPORTING
          UTC_START = LV_UTCSTART
          UTC_END   = LV_UTCEND
        IMPORTING
          SECOND    = LV_SECOND
        EXCEPTIONS
          PARAMERR  = 1
          OTHERS    = 2.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Wait for total time
    WAIT UP TO LV_SECOND SECONDS.
    2. Now, create one method in the BOR object whose event triggers your workflow.
    3. Use this method in an activity step in you workflow where you want to wait on some given conditions.
    => You can use the email ID which was given by earlier step in Send Mail step. Just make your email id field as Export/Import <i><b>AD_SMTPADR</b></i> type of parameter. In the send mail, use this Id in Email Address input.
    Hope this helps your.
    PS If the answer solves  your query, plz close the thread by marking it Solved and rewarding each reply.
    Regards

  • Problem in sending mail through workflow

    Hi All,
      I am trying to create a workflow. I created a workflow and once document is made, this workflow trigerrs and i am able to get user decision to my user id. once if i click on approve, mail should be triggered to my mail id. but mail is not coming to my mail id. i checked in SOST transaction, <b>mail status set to Transmitted.</b>, and not as sent .
    But i tested a sample test message from sbwp to my mail id and it is working fine. Only through workflow, sending message to outlook is not working. i checked my user in the system in SU01 transaction also, there also mail id is mentioned. what could be reason for not able to send mails through workflow.?
    Its urgent.
    Points will be awarded to all.
    Regards,
    vinoth

    Hi,
    Check that all the bindings have been done in proper way as it is configured.. Try to do the binding manualy..This could also be the problem..
    thank You

  • Sending Mail from workflow or updating container elements

    Dear friends,
    I'm new to work flow.
    My requirement: <b>send mail from workflow to a user after dead line is missed</b> I do not want to use messages in 'Latest end' tab. I want to send mail.
    The mail id of the user is determined in the previous step using a FM. How do I use this mail id to send the mail. I thought of using 'Rule' option in 'Send Mail' (and use same FM)but thats not possible. In that case how do I pass the mail id value to the WF container from the FM?
    I also tried this idea:
    created a task with BOR object SELFITEM, method 'SENDTASKDESCRIPTION' .
    *in an activity step used this task and filled the 'Rule' option in notification tab appropriately
    *in this case the WF goes into an error '.....error executing 'sendtaskdescription' .....'
    *i would prefer using the activity step because, the mail has to be sent after a delay
    Is there any other simple method to do this?
    My problem would be solved even if someone can show me how to transfer values from a FM into a WF container.
    Can someone please explain?

    Reposted under different thread

  • Surname not recognized when sending mail via FM

    Hi SDN,
    I am on WAS 6.20. SRM System.
    I have a BSP, which sends mail via FM SO_NEW_DOCUMENT_ATT_SEND_API1.
    when putting a normal dialog user in the ICF Service of the BSP I get a mail in my email client, which shows as sender the forename, surname of the corresponding SU01 SAP User. When putting service user in the ICF service the sender, which shows up in my email-client is always 'www' even though I changed fore- and surname of this service user. Why is that?
    regards, matthias
    Message was edited by: Matthias Kasig
    Message was edited by: Matthias Kasig

    I am with you. I think they still have a dud server in their farm and when you get it you get the error message. How to get to level two support is the trick I think.

  • Sending mail via forms no longer working

    Recently, on one of our servers (XServe G4 - 10.3.9) was running both web and mail. Mail was moved off of the server 2 days ago onto a newer server (10.4.7)
    The web server has: php4.3.11 and is ONLY running AFP/OD/Web
    Since the transfer of the mail server to the new machine, all web sites can no longer send mail via their scripts (either by sendmail, php's mail(), or by connecting to SMTP server via php).
    The web logs do not show errors when it attempts to send the mail...
    A look at mail.log shows
    "relay=cyrus, delay=2558, status=deferred (temporary failure. Command output: couldn't connect to lmtpd: Connection refused_ 421 4.3.0 deliver: couldn't connect to lmtpd_)
    As far as I'm aware, the web server/sendmail shouldn't be attempting to use cyrus at all. For the record, Cyrus master is not running.
    All users can access the mail server without any difficulty. DNS entries have been checked and double checked.
    Does anyone know why sendmail and php mail functions stopped working? I really need to get these web forms functioning again. Is the problem with apache, php, sendmail or something else?

    Hi Camelot,
    Thanks for the quick reply and useful suggestion. I did as you mentioned and fired up the mail server.
    The mail "delivered" however, I notice a couple issues in the logs (mail.log)
    issue #1: I have to start cyrus master manually via > sudo /usr/bin/cyrus/bin/master SA and command line start/stop of mail does not start master. Also, when starting master from command line as mentioned, terminal hangs.
    issue #2 (from mail.log) - still getting the same lmtpd error (but messages do finally get delivered):
    Jan 14 03:58:24 www postfix/pipe[2914]: 3503858502D: to=<[email protected]>, relay=cyrus, delay=5327, status=deferred (temporary failure. Command output: couldn't connect to lmtpd: Connection refused_ 421 4.3.0 deliver: couldn't connect to lmptd_ )
    Jan 14 03:59:39 www postfix/cleanup[2906]: B60AE58572B: to=<[email protected]>, relay 123.123.123.123[123.123.123.123], delay=0, status=sent (250 Ok: queued as 9FBF41BCBCA)
    Do you think these are "issues" to contend with or are they "normal" occurances?

  • Alias address from iCloud alias address cannot be used to send mails via iPad

    Alias address from iCloud alias address cannot be used to send mails via iPad

    If you still have this concern: You can only use the alias address linked to the main iCloud account that you backup your iPad to. You can check that going to Setting-iCloud and check the Account email address.
    I think this restriction is rather rediculous. I don't see why we can't configure an alias from a different iCloud account the same way we do for a Gmail account. I hope Apple fixes this in iOS 6.

  • Cant Send Mail via DSL

    Im Apple Mail using iMac G4 and G4 tower. Both will recieve an send mail find via dial-up but will not send mail via dsl connection.
    We get our mail via ethernet > router > antenna > atenna > another router > antenna > ten miles away at another antenna then to dsl source.
    So our dsl connection/signal is going threw three other antennas and at least one router here in office before we get it.
    My ISP provider says we need to talk to our DSl provider.
    Any ideas? Our computer tech is out of office touch for a week.
    Ran

    Thanks but this doesn't answer my question.
    Allan, I am 99% percent sure that my ISP is not the same ones who supply our ethernet/broadband/DSL.
    Is your internet service provider (ISP) for your
    dial-up connection different from the ISP for the DSL
    connection?
    Yes, I believe that they are differrent, however, I have new info.
    At first my G4 tower with Earthlink account would not send out over etherner/broadband/DSl, but now it does! I, nor anyone else, has made any changes to the outgoing address that works for dial-up connection and is what we have always used until yesterday when we first tried the dsl/braoband
    Kind of a different situation and not typical or the
    norm to have a company that provides a DSL connection
    not be the internet service provider for the
    connection.
    Someone new came into our building for office space. He had the router, ethernet cables and antenna installed. He/we get electro-magnetic radiational signal from a larger business across the street who has a tower --soon to be a taller tower-- and they get there radiational signal from 10 miles away.
    Knowing who your ISP is for connecting to the
    internet regardless if using a dial-up connection or
    a DSL connection (DSL is considered a broadband) is
    important and if the email account and SMTP server
    being used is provided by the ISP being used for your
    internet connection or by a different email account
    provider not associated with the ISP used for
    connecting to the internet.
    Yes, I understand that is the case. Maybe I'm wrong and by some coincidence the DSL provider is Earthlink and that is why the G$ tower account began working for the outoging mail.
    Im still having the sam problem on the G4 iMac which is a local.com account they have told us the same as you have, that we need to know who the DSL provider is and what info they require in the outgoing( smtp ) line.
    You mentioned Earthlink which is an internet service
    provider that offers dial-up access and/or DSL access
    so does the Earthlink protocol you mentioned mean you
    are having problems sending with an Earthlink email
    account and SMTP server?
    Earthlink account is working now so again perhaps the DSL provider is coming through Earthlink and ergo we didnt need to make changes to the outgoing( smtp ) info line.
    Thats the only way that one can be explained.
    I take it you use the dial-up connection at home
    (which is provided by Earthlink?) and the DSL
    connection is used at the office?
    Thats correct. The inital DSl source for the business that is 10 miles away, must use Earthlink. I'm now presuming this is the case with this new info.
    However, there is another --3rd-- business on other side of street and he uses --Apple mac just like me-- and his ISP is "host centric". I looked at his mac preference accounts outgoing ( smtp ) line and his is
    "mail.the business name.com:his email address",
    i.e. he does not use Earthlink but he has no problem sending out mail via the same DSl/broadband connections we have
    The only reason he has his address in the outgoing mail liine is bceause he too is in larger business building with several differrent computers and email address's.
    I've tried all kinds of combinations that are similar to the Earthlink outgoing and the hostcentric outgoing
    but none work for the local.com account.
    The exact error message provided when trying to send
    messages is also pertinent information.
    "message delivery failed" "the attempt to read data from the server 'server-name' failed"
    Then it gives me option to try differrent server names.
    Thanks for your efforts Allan and ohters.
    Ran

  • I send mail via SMTP server with Hebrew text, and I get it gibberish on my iphone

    I send mail via SMTP server with Hebrew text, and I get it gibberish on my iphone

    What mail program from what kind of computer are you sending your email?  It sounds like an encoding problem that would have to be solved on the sending end.   If you want, send me an example of the kind of email which arrives as gibberish on your iphone (tom at bluesky dot org).

  • Can't send mail via mail

    Greetings O Wise Ones,
    The smtp setting are correct. I can receive mail. The mail app was working fine one minute and the next I couldn't send mail. Tried a new smtp and it didn't work either, Created a new login user and new mail. The smtp work with the new user but not with the old one. Any ideas that don't delete the com.apple.mail.plist? If that's the only way. How do I save my mail boxes?

    This is happening to my wife's Leopard 10.5.8 upgraded machine right now.
    We've been using Apple Mail for years and it works, but suddenly stopped working
    and refuses to send mail via any SMTP server at all. It just spins forever and eventually
    complains it can't.
    The account is configured to send via comcast (smtp.comcast.net), DSL (smtp.sbcglobal.yahoo.com), and gmail, as choices. Two of them require authentication, Comcast doesn't require authentication, only that the e-mail be sent via the Comcast cable router, which it is.
    I've tried removing the SMTP accounts and carefully re-adding, removing the Gmail IMAP mail account itself in Apple Mail and re-adding, and even moving aside the /Users/<user/Library/Mail folder so it can be re-added. I've even used the sqlite3 index vacuum command.
    On my own Mac Pro, 10.5.8, I'm able to send e-mail, but on the notebook mail is wedged up for good and it seems to be associated with the upgrade. I am now re-installing 10.5.8 from the 'combined' download, and I'll see if it fixes it. What a hassle.

  • Can't send mail via wi fi

    I have a pop3 and gmail accounts setup up on my 3Gs iphone. My problem is that I can't send mail via any wi fi connection. I can receive mail via wi fi and both send and recieve via 3G .
    Can anyone help?
    Thanks in advance
    Dave

    Hi Graham,
    It is my home wifi I am having the problem with. I was able to send and receive with my iphone 3G model from my home wifi, but since I upgraded to 3Gs, I can't send email thro my home wifi, so I have to dosable wifi and then send via 3G, a bit frustrating. Any suggestions as it worked fine when I had the 3G iphone??
    Thanks

  • Sending mail via Javascript.

    It is possible to send mail via a Javascript. If so can anyone support me with the code to do so.

    you use the Windro$$ scripting host, and use an ActiveXObject to access the Outlook (not express) poroperties.
    I used to do them a lot because they save me time... all automated is always better.
    For example, here is a script that changes the read-only, etyc file properties on a windro$$ box. (I used it when copying CDs)
    /* Changes the file attributes in a batch of files starting in
    * the current directory and progressing according to parameters
    /*  LOGIK:
        -get the path to a file in folder
            change attribute of file/dir.
            repeat until there are no more files
                go to next folder
                start again
    *                     VARIABLE PARAMETERS                      *
    * includeSubDirectories {true | false}                         *
    *     Should the subdirectories' files be changed too?         *
    * numberOfLevelsDeep {0 | 1..99999999999}                      *
    *    The number of levels of subdirectories that should be     *
    *    affected (0 = all)                                        *
    * onlyFilesWithExtension {"" | "extension" | ["extension",     *
    * "list"]}                                                     *
    *    Only the fies with this extension are to be changed       *
    *    ("" = all, no regexp) (arrays can be used ["htm", "html", *
    *    "gif", "jpg", "jpeg"])                                    *
    * NewAttributes:                                               *
    *   readOnly {true | false}                                    *
    *      Set files to read only?                                 *
    *   hidden {true | false}                                      *
    *      Set files to hidden?                                    *
    *   archive {true | false}                                     *
    *      Set files to archive?                                   *
    *   system {true | false}                                      *
    *      Set files to system files?                              *
    var includeSubDirectories  = true;
    var numberOfLevelsDeep     = 0;
    var onlyFilesWithExtension = "";
    var NewAttributes = {
        readOnly : false,
        hidden   : false,
        archive  : false,
        system   : false
    //MAIN FUNCTION
    function main(){
        chmod(path, 0, numberOfLevelsDeep, includeSubDirectories);
    //OBJECTS
    //FUNCTIONS
    // This arguments are here just to pass information around during
    // runtime
    function chmod(dir, browseNumber, levels, subdirs){
        //If the number of levels deep has been reached and
        //the number of levels is not 0 then end
        if(browseNumber > levels && levels != 0){
            return;
        }else{
            browseNumber++;
        //get directory as a folder object
        dir = FSO.GetFolder(dir);
        var FILES = new Enumerator(dir.files);
        var DIRECTORIES = new Enumerator(dir.subFolders);
        for(; !FILES.atEnd(); FILES.moveNext()){
            try{
                //Change file settings
                var currentFile = FSO.getFile(FILES.item());
                //if we have an extension array...
                if(extensionIsArray){
                    for(var i in onlyFilesWithExtension){
                        if(onlyFilesWithExtension[i] == ""
                        || FSO.getExtensionName(currentFile).toLowerCase(
                        ) == onlyFilesWithExtension.toLowerCase()){
    changeAttributes(currentFile);
    break;
    }else{
    if(onlyFilesWithExtension == ""
    || FSO.getExtensionName(currentFile).toLowerCase(
    ) == onlyFilesWithExtension.toLowerCase()){
    changeAttributes(currentFile);
    }catch(error){
    WSH.popup("Unable to change file '" + currentFile + "'\n" + error.description, 0);
    for(; !DIRECTORIES.atEnd(); DIRECTORIES.moveNext()){
    if(subdirs){
    chmod(DIRECTORIES.item(), browseNumber, levels, subdirs);
    changeAttributes(DIRECTORIES.item());
    }else{
    return;
    function changeAttributes(filename){
    var err = "pagefile.sys";
    if(("" + filename).substring(("" + filename).length - err.length, ("" + filename).length).toLowerCase() == err){
    return; // The file is the virtual memory buffer... ignore!
    //Try to use the filename as if it was a file.
    //If operation fails, then we have a folder.
    //In either case the change of properties should work.
    try{
    filename = FSO.getFile(filename);
    }catch(error){
    filename = FSO.getFolder(filename);
    //Change the file/folder attributes if necessary
    for(var i = 0; i < 4; i++){
    if(filename.attributes & modes[i]){
    if(!newca[i]){
    filename.attributes = filename.attributes - modes[i];
    }else{
    if(newca[i]){
    filename.attributes = filename.attributes + modes[i];
    //CONSTANTS
    var FSO = new ActiveXObject("Scripting.FileSystemObject");
    var WSH = new ActiveXObject("WScript.Shell");
    //VARIABLE DECLARATIONS
    //geth the location of the script
    var path = FSO.getParentFolderName(WScript.scriptFullName);
    //If this is an array, element 0 will not be undefined
    var extensionIsArray = onlyFilesWithExtension[0] + "" != "undefined";
    //Convert object to usable array
    var newca = [NewAttributes.readOnly, NewAttributes.hidden, NewAttributes.archive, NewAttributes.system,];
    //[readOnly, hidden, archive, system]
    var modes = [1, 2, 32, 4];
    //changeAttributes("c:\\autoexec.bat");
    //Go!!!
    main();
    dave.

  • Sending Mail via BSP

    hi all,
    i have a problem in sending mail via bsp.
    the case is i want to send reminder from e-portal. in order to do that i made a new bsp page and a new function modul.
    the bsp page is used for user interface and the function modul is used for the process for sending mail.
    in the function modul i send the mail via api.
    the bsp page and function modul is already finish. but when i testing them, the mail is not sent into mail inbox.
    if i checked in sap outbox, the mail sent via bsp is exists.
    i try to debug it the code for bsp page and function modul is already ok, no error occured.
    is there any clue why this happened ?
    is there any thing else that need to be config or set ?
    please help
    regards
    eddhie

    hi Raja,
    i have solved the problem sending mail via bsp.
    many thanks for your help, i rewards point for your answer.
    about the sap notes that you told me before, is it the way for setting how to send mail / messages via web application server right ?
    could please you give little explaination for the notes, because i think 80% of the notes is for basis configuration and i don't have authorization.
    beside that, what i have to do if in transaction SCOT there is a lot document still waiting for transmitted ?
    please help
    regards
    eddhie

  • I have a problem sending mail via smtp. I use a satellite system and the average return time for a ping is 675ms. Is this a problem with mail? If so can I change Mail to accept it. The problem also exists with Lion

    I have a problem sending mail via smtp. I use a satellite system and the average return time for a ping is 675ms. Is this a problem with mail? If so can I change Mail to accept it. The problem also exists with Lion and on both my MacPro and my wife's Imac. I also see my mailboxes randomly disconnecting and reconnecting. Any other ideas of a possible cause?

    I solved it myself, after the "note" which came back from FF/Mozilla just as I finished my message, commenting on what it was that my system had , I wnnt back to check my plug-ins etc. I downloaded the latest Java, BOTH 32bit AND 64 bit versions and latest Firefox.
    Now all is working.
    Thanks,
    B.

Maybe you are looking for