I need Send approval mail use code .

We know in Exchange Server, We can open EMC set TransportRule , and set Transport Rule Action "ModerateMessageByUserAction" or  "ModerateMessageByManagerAction".
I need curstom RoutingAgent class and send Moderate Message. how to do is . thanks all.
use ILSpy tool see ModerateMessageByUserAction source code :
namespace Microsoft.Exchange.MessagingPolicies.Rules.Tasks
[Serializable]
public class ModerateMessageByUserAction : TransportRuleAction
private const string InternalActionName = "ModerateMessageByUser";
private const string AddressDelimiter = ";";
private SmtpAddress[] addresses;
[LocDescription(Strings.IDs.ToAddressesDescription), LocDisplayName(Strings.IDs.ToAddressesDisplayName), ActionParameterName("ModerateMessageByUser")]
public virtual SmtpAddress[] Addresses
get
return this.addresses;
set
this.addresses = value;
internal override string Description
get
string text = RuleDescription.BuildDescriptionStringFromStringArray(Utils.BuildSmtpAddressStringList(this.Addresses), Strings.RuleDescriptionAndDelimiter);
return Strings.RuleDescriptionModerateMessageByUser(text);
protected override void ValidateRead(List<ValidationError> errors)
if (this.Addresses == null || this.Addresses.Length == 0)
errors.Add(new RulePhrase.RulePhraseValidationError(Strings.ArgumentNotSet, base.Name));
return;
SmtpAddress[] array = this.Addresses;
for (int i = 0; i < array.Length; i++)
SmtpAddress smtpAddress = array[i];
if (!smtpAddress.IsValidAddress)
errors.Add(new RulePhrase.RulePhraseValidationError(Strings.InvalidRecipient, base.Name));
return;
base.ValidateRead(errors);
internal static TransportRuleAction CreateFromInternalAction(Action action)
if (action.get_Name() != "ModerateMessageByUser")
return null;
List<SmtpAddress> list = new List<SmtpAddress>();
string stringValue = TransportRuleAction.GetStringValue(action.get_Arguments().get_Item(0));
string[] array = stringValue.Split(new string[]
}, StringSplitOptions.RemoveEmptyEntries);
string[] array2 = array;
for (int i = 0; i < array2.Length; i++)
string text = array2[i];
SmtpAddress item = new SmtpAddress(text.Trim());
list.Add(item);
if (list.Count == 0)
return null;
return new ModerateMessageByUserAction
Addresses = list.ToArray()
internal override Action ToInternalAction()
StringBuilder stringBuilder = new StringBuilder();
SmtpAddress[] array = this.Addresses;
for (int i = 0; i < array.Length; i++)
SmtpAddress smtpAddress = array[i];
if (!smtpAddress.IsValidAddress)
throw new ArgumentException(Strings.InvalidRecipient, "Addresses");
string value = smtpAddress.ToString();
if (string.IsNullOrEmpty(value))
throw new ArgumentException(Strings.InvalidRecipient, "Addresses");
if (stringBuilder.Length > 0)
stringBuilder.Append(";");
stringBuilder.Append(value);
ShortList<Argument> shortList = new ShortList<Argument>();
shortList.Add(new Value(stringBuilder.ToString()));
return TransportRuleParser.Instance.CreateAction("ModerateMessageByUser", shortList);
Anything is Possible!

Hi, Glen.<o:p></o:p>
Thanks your reply. Your solution is of great help to me.<o:p></o:p>
I can add a keywords in x-header as transport rule predicate,
but the transport rule action how to do dynamic sets a approval user.<o:p></o:p>
Because I extended Outlook client and user selection who approved.<o:p></o:p>
What's the good suggestions and ideas?<o:p></o:p>
Thanks.<o:p></o:p>
Anything is Possible!

Similar Messages

  • Sending HTML mail using code in workflow

    Hi All
    I follow somerecomendation to create a program to send the mail out. using a program
    My code looks as the following.
        DATA:   l_docdata TYPE sodocchgi1,
                li_content TYPE TABLE OF solisti1,
                li_receiver TYPE TABLE OF somlreci1,
                l_ename     TYPE pa0002-cname,
                l_text(255),
                lw_receiver TYPE somlreci1.
        l_docdata-obj_name = 'Notification'.
        l_docdata-sensitivty = 'P'.
        l_docdata-proc_syst = sy-sysid.
        l_docdata-proc_clint = sy-mandt.
        l_docdata-obj_descr = 'TEST'.
    l_text  = 'Testing Content'.
    APPEND l_text TO li_content. CLEAR l_text.
    lw_receiver-receiver = 'MyMailtest@GM ail.com'.
    lw_receiver-rec_type = 'U'.
    APPEND lw_receiver TO li_receiver.
        CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
          EXPORTING
            document_data              = l_docdata
            commit_work                = 'X'
            DOCUMENT_TYPE              = 'HTM'
          TABLES
            object_content             = li_content
            receivers                  = li_receiver
          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.
    I try to use the code above and i manage to send the mail out. However when i change the l_text  = 'Testing Content'  to  l_text  = '<A HREF="http://www.google.com">Click Here</A>'  , it does not reach my mailbox even in in transaction SCOT, i can see that it was succesfully transmited.
    Anyone have any idea about this?
    Thanks.
    Regards,
    Bryan.

    Hey PJ,
    I manage to send out the email using the htm type. However, instead of having a hyperlink saying click here and it link to another page, i am getting something like this in the email.
    Click Here <http://www.google.com> 
    In my code, i write 
    <A HREF="http://www.google.com">Click Here</A>
    , but the content just turn to above. What i wan is a CLICK HERE link and will link to google.
    Thanks.
    Regards,
    Bryan.

  • Unable to sending a mail using odisend mail

    Hi,
    i have a need to send a mail using odi send mail, i am using gmail server getting to send a mail, but it getting error like this
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. d19sm1563829ibh.8
         at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
         at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
         at javax.mail.Transport.send0(Transport.java:169)
         at javax.mail.Transport.send(Transport.java:99)
         at com.sunopsis.dwg.tools.SendMail.actionExecute(SendMail.java:220)
         at com.sunopsis.dwg.function.SnpsFunctionBase.execute(SnpsFunctionBase.java:276)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java:3430)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeOdiCommand(SnpSessTaskSql.java:1491)
         at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:32)
         at oracle.odi.runtime.agent.execution.cmd.OdiCommandExecutor.execute(OdiCommandExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:662)
    please share your opinions for this post
    Regards,
    901202

    http://www.oracle.com/technetwork/java/javamail/faq/index.html#starttls

  • Sending e-mail using utl_smtp on oracle 9i

    Hello
    I have problem with sending e-mails using utl_smtp package.
    My code looks like this:
    lv_mail_conn := utl_smtp.open_connection(lv_mailhost_txt);
    utl_smtp.ehlo(lv_mail_conn, lv_mailhost_txt);
    res :=     utl_smtp.command(lv_mail_conn, 'AUTH LOGIN');
    res := utl_smtp.command(lv_mail_conn, <login in base64>);
    res := utl_smtp.command(lv_mail_conn, <password in base64>);
    And I get en error after sending a password to SMTP server.
    Error code: 535, text: 5.7.3 Authentication unsuccessful.
    This happens on oracle 9i.
    I have another server for testing which has oracle 10g installed. This code works fine on oracle 10g but doesn't work on oracle 9i.
    Do you have any ideas what's wrong? I assume that SMTP server (microsoft exchange) work correctlys because I can send e-mail from test server.

    Ok problem solved :)
    Problem was between oracle and MS exchange server. Live server oracle 9i is on linux, and testing server works on windows.
    So the problem was with configuration. Our admins corrected it and now works :). I don't know details.

  • How to send e-mail using PL/SQL

    I need to send e-mail using PL/SQL. Is it possible?
    Thanks in advance,
    Agnaldo

    Yes. Use the UTL_SMTP package

  • Can't send E-mails using Outlook Express on WRT300N

    Hello, I searched through the forums to find problems similar to mine, but everyone had a different router than mine, plus none of the solutions worked for me.
    I just purchaced and installed my router yesterday. Since the install, I have not been able to send e-mails using Outlook Express, but I do recieve e-mails. I am using the WRT300N Wireless-N Router.
    Trying to get my local news service up and running, and right now, e-mail communication is vital........
    Thanks.
    -Ryan French
    Tampa Bay News Online

    Well of course, but the error message says socket error, which doesn't tell how to fix it. Even the Outlook Express help site doesn't give any suggestions to fix anything, other than "Your internet connection has failed," which is not the problem.
    To the disable firewalls suggestion: I did try disabling my firewalls and all of my virus/ e-mail scan software just to check it out. The thing is, I don't see how my Windows XP Firewall, or anything I've been using could be a problem. Right now, because of the error all my sent e-mails are stuck in the outbox, when I disconnect my router and connect everything back up leaving the router out of the picture, the e-mails are sent out as normal. This problem only occurs with the router connected.
    I also need to stream live audio, and I've heard it's a pain using a wireless router...
    Thanks for the suggestions, hopefully someone will provide the winning suggestion so I don't have to call customer service!

  • Sending automatic mail using JSP or Servlet

    hello,
    i was just wondering if anyone out there knows how can automatically send emails to client from my application after receiving thier email address. the email address is received from a form and i want my application to automatically send a structured email to the client as soon as they click the send button. i am using JSP and tomcat as my server. any help will be appreciated

    You must create a class that sends the mail:
    A code example would be like this:
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import java.util.*;
    public class MailSender {
         public void postMail(String smtpsrv, String recipients[], String subject,
                   String message, String from) throws MessagingException {
              boolean debug = false;
              //Set the host smtp address
              Properties props = new Properties();
              props.put("mail.smtp.host", smtpsrv);
              // create some properties and get the default Session
              Session session = Session.getDefaultInstance(props, null);
              session.setDebug(debug);
              // create a message
              Message msg = new MimeMessage(session);
              // set the from and to address
              InternetAddress addressFrom = new InternetAddress(from);
              msg.setFrom(addressFrom);
              InternetAddress[] addressTo = new InternetAddress[recipients.length];
              for (int i = 0; i < recipients.length; i++) {
                   addressTo[i] = new InternetAddress(recipients);
              msg.setRecipients(Message.RecipientType.TO, addressTo);
              // Setting the Subject and Content Type
              msg.setSubject(subject);
              msg.setContent(message, "text/html;charset=utf-8");
              Transport.send(msg);
    You 'll find out that its easy to understand the code.
    I advise you not to change this code.
    I also include an example of how to right the JSP code:
    <%
    MailSender MS = new MailSender();
    try {
         MS.postMail(server, recipient,"Your E-mail Title", "BODY content", from);
         } catch (MessagingException e1) {
                        e1.printStackTrace();
    %>
    This JSP code follows the pattern of the above class
    Hope to help you
    Cheers!!!

  • If I click on an e-mail address link in a web page instead of a blank message opening I always get a pop up screen with a log-in for googlemail. I do not have and do not want a googlemail account. I just want to be able to send e-mails using Outlook.

    If I click on an e-mail address link in a web page instead of a blank message opening I always get a pop up screen with a log-in for googlemail. I do not have and do not want a googlemail account. I just want to be able to send e-mails using Outlook.

    OUtlook was already set as the mail client for FF, and is my operating system (XP)'s default mail programme. therefore problem not solved at all. what I get whenever I follow a link in a webpage to send an e-mail is a little pop up window asking me to sign in to gmail or open an account. any other suggestions?

  • How to bypass proxy when trying to send a mail using javamail smtp

    Hi,
    I am trying to make a servlet send a mail using javamail smtp protocol on port 25 but i m not able to send getting an exception, i suspect proxy is blocking, so any idea anyone how bypass a proxy.

    And if it does turn out that there's a proxy server blocking access to your target SMTP server, the best way to deal with that is to discuss the issue with the person responsible for your network configuration.

  • Sending e-mail using Mail on a new AT&T modem

    Since installing a new AT&T (Motorola) DSL modem, I cannot send e-mail using Apple Mail. AT&T tells me that it is a known issue with Apple, and that they will put me on "the list" for Apple to contact me. Has anyone gotten any satisfaction on this issue? Thank you. 

    I have experience the same email-related problem on both my new MacBook Pro and my iPod Touch.
    - There are also times when I will start one or the other device and get a message on the screen that reads, in effect, that another device is using the connection and cannot connect the second. (I thought mutliple devices could use the connection at the same time as long as they had the router's password.)
    - In addition, the connection will frequently disconnect, and I have to restart the modem to reconnect.
    - I have recently installed an Apple Airport Express router (which works just fine), and subsequently had to replace the modem. That's when the troubles started.

  • Send a mail use FM 'so_object_send' with a Script form layout

    Hi,
    I try to send a mail use FM 'so_object_send', is it possible to use a sap script form for the layout?
    Please give more details....

    Hi,
    Did you debug and check this function module 'SO_NEW_DOCUMENT_SEND_API1' ?
    As you said its giving you a sy-subrc = 2, did you check at what stage it is giving you an error ?
    Also, Commit work = 'X' has nothing to do with this as you are getting an error of Sy-subrc = 2.
    Also, while debugging are you getting the email address fetched from database table ? If no, then the sender's email has not been maintained. You will have to maintain the sender's email in the user details in SU02 under Address tab.
    I would recommend you to go for BCS to send emails wherein you specify the sender email address directly in the program rather than adding email address in every user's logon details.
    Regards,
    Danish.
    Edited by: Danish2285 on Mar 5, 2012 3:28 PM

  • HT5225 unable to send receive mail using Mail 2.1.3

    Ever since iCloud took over, I am no longer able to send/receive mail using Mail 2.1.3 on my 10.4.11 version.  I didn't think it would affect it.  Someone please help as to how I can rectify the issue!

    Hi,
    Please review the following note:
    Note: 371830.1 - Notification Mailer Does Not Start, Remains In Status Starting
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=371830.1
    If the above does not help, I suggest you run "Workflow Diagnostics" test and see if it returns any error/warning messages.
    Note: 274764.1 - Oracle Workflow Cartridge Workflow Java Mailer Setup Test
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=274764.1
    Note: 378281.1 - How Does One Verify The Notification Mailer Is Functioning Properly?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=378281.1
    Regards,
    Hussein

  • After installing the notified update I am unable to send e-mails (using O/E on XP) as my system is supposedly unsecure. (I receive a message saying "... Secure(SSL): No, Error Number: 0x800CCC0F".) Everything was working fine immediately before I updated.

    After installing the notified update I am unable to send e-mails (using Outlook Express on Windows XP) as my system is now thought to be Unsecure. (I receive a message saying "... Secure(SSL): No, Error Number: 0x800CCC0F") Everything was working fine immediately before I installed the update. Can anyone (pleeeease) tell me where Flash has changed my security settings as I have looked at the setup, but everything looks okay. Thankyou!

    Branching this to a new discussion as it appear you are facing difficulties with the installation or running the programs you have been downloading and installing.

  • Cannot send e-mail using webmail or Thunderbird

    Since I was instructed to change my account password and walked through the person with a customer service rep a few weeks ago, I have been unable to send e-mail using Thunderbird.  Now, for the last week, I have been unable to send e-mail through Verizon Online (webmail).  I seem to be receiving e-mail normally online.  Also, I have 3 subaccounts that are working normally.
    Any suggestions (other than the ones on the support website--I've followed all those suggestions and changed all those setting, but nothing has worked) would be appreciated.  Thanks!

    beakersgirl13 wrote:
    Since I was instructed to change my account password and walked through the person with a customer service rep a few weeks ago, I have been unable to send e-mail using Thunderbird.  Now, for the last week, I have been unable to send e-mail through Verizon Online (webmail).  I seem to be receiving e-mail normally online.  Also, I have 3 subaccounts that are working normally.
    Any suggestions (other than the ones on the support website--I've followed all those suggestions and changed all those setting, but nothing has worked) would be appreciated.  Thanks!
    What error are you getting when attempting to send through webmail?
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.
    "All knowledge is worth having."

  • Sending php mail(); using postfix. Authentication failed.

    Trying to set up my localhost to send php mail() using postfix.
    I did the following:
    Created the sasl_passwd file
    Created the sasl_passwd.db file
    Edited mail.cf in the postfix folder to include relay host: relayhost=smtp.live.com:587
    I'm trying to relay through my hotmail account. The mail.log returns the following:
    Jan 24 13:17:30 Richards-MacBook-Pro.local postfix/error[927]: E75CCE40EE4: to=<[email protected]>, relay=none, delay=1580, delays=1580/0.07/0/0, dsn=4.0.0, status=deferred (delivery temporarily suspended: SASL authentication failed; server smtp.live.com[65.55.162.200] said: 535 5.0.0 Authentication Failed)
    Any ideas what I'm doing wrong here?

    Ok problem solved :)
    Problem was between oracle and MS exchange server. Live server oracle 9i is on linux, and testing server works on windows.
    So the problem was with configuration. Our admins corrected it and now works :). I don't know details.

Maybe you are looking for

  • Settlement Rule

    Can anyone please advise on the following. We have a project (WBS) created that has a settlement rule just for AUC in 07/08, was settled in both 07/08 and 08/09 with automatic settlement. We know want to add a rule for full settlement to transfer it

  • I can't transfer movies from itunes library to ipod nano 4th gen

    for some reason when i click and drag the moies i want, from my movies tab in my itunes library, to my nano tab, nothing happens. and the movie does not show up on the ipod. i have the most recent itunes which i downloaded yesterday. or rather it rep

  • Help on LSMW for extending materials to storage location

    Hi Friends, Please guide me with steps in LSMW to extend material master data to different storage location with same plant using tcode MMSC. Thanks in advance Smitha

  • Mapping - Filtering criteria

    Hi Friends, In my source structure i have one of the field called "Purchase ID". I need to map this field to target based on one criteria as follows : Only the following Purchase ID's should be considered from source xml. Purchase ID 100 101 Requrime

  • HP Vectra VL400 series video drivers

    We are trying to install Solaris 2.7 on the HP Vectra VL 400 series Pentium III. We cannot get the video driver configured during installation. Please help!!! Where do we go to get the most current video graphics driver.