Content filter on message body

I'm trying to setup a content filter for the message body containing the smart identifier "credit card".  It works fine if I set the fitler for message body and attachments.  However if I set the filter for message body only, the messages containing credit card numbers are not filtered.
Any suggestions?  Is this a bug?  This is Model B10, Operating System 6.6.1-016.
Thanks.

I'm trying to setup two filters on inbound messages.  One would check for a credit card in the body and drop the message (and notify the recipient).  The other would check for a credit card in attatchments and strip those attachments but let the rest of the message through with a disclaimer added.

Similar Messages

  • Regular Expression in content filter

    Hey,
    i want to create a content filter with the "body-contains"-condition in combination with a regular expression. To specify it:
    I want to check whether a string (disclaimer) is already added to the email. If not, i have to add the footer.
    So to say: REGULAR EXPRESSION = does not contain "string"
    But how does the regular expression look like?
    <rule>
    <rule_type>Only_Body_Contains_Rule</rule_type>
    <rule_data>REGULAR EXPRESSION (does not contain...)</rule_data>
    <rule_extra1>1</rule_extra1>
    </rule>
    Thx

    you MAY be able to use a negative lookahead assertion like:
    ?!EXPRESSION
    this results in:
    content_filter: if (only-body-contains("?!disclaimer text", 1) )
    OR in message filters you can say:
    if ( not body-contains("EXPRESSION",1) )
    all that said, you should just have two content filters, 1 to check for the filter and deliver immediately (w/o filter stamp) and another catch-all filter to stamp filters. for example:
    disclaimer_skip
    disclaimer_skip: if (only-body-contains("disclaimer text", 1)) { deliver(); }
    outbound-disclaimer-catchall
    outbound-disclaimer-catchall: if (true) { add-footer("my_disclaimer"); }
    cheers,
    andrew

  • TS4002 iCloud emails message body showing blank in Mac mail.

    The content of emails (message body) is sometimes blank in Mac mail but visible on both my iPhone and iCloud. I can't seem to find a fix?

    Strange that this is such an old thread - seems like the problem has popped up again here.

  • Content filter not fixed, still stripping message body

    The content filter that arbitrarily strips out (part of) the body of my
    email messages is not fixed: http://forums.adobe.com/message/1867251#1867251
    Jochem
    Jochem van Dieten
    http://jochem.vandieten.net/

    I think I found out why the message body of my messages is stripped out. It appears Jive is filtering the content of email messages with the following regular expression:
    * Simple bean for storing the contents of an incoming email.
    public class Message {
        // ripped from EmailParserImpl
        private static final Pattern originalMessagePattern = Pattern.compile("(-{5,}|_{5,}|^.*wrote:$)(\\s*.*)*", Pattern.MULTILINE);
    My first impression is that this implementation is somewhet simplistic. For instance, it doesn't take into account whether you just quoted a single line or all of the message. For a great example of that, look at the House of Fusion email archives, where you can see selectiive quotes are allowed, but complete quotes of full messages are filtered out. It also doesn't do pattern matching on the standardized string that starts a signature.
    More insight into the behaviour of the email integration can be obtained from the sourcecode of the Jive advancedemail plugin. Although I am not sure it is the same version as Adobe is running, there are some comments and TODO's in the code about behaviour I am not seeing in the email from these forums, but it still helps to understand what is happening.

  • Confusing about Message filter and Content filter

    I have a message filter do quarantine action:
    badbody: if body-dictionary-match("badbody", 1) {
    quarantine ("Policy");
    deliver();
    also I write a content filter 'good' to see what spams are missed by Ironport Antispam:
    Conditions (only if all conditions match):
    header("X-IronPort-Quarantine") != "^Policy$"
    header("X-Spam-flag") != "^(?i)YES$"
    Action:
    duplicate-quarantine ("good")
    deliver()
    I think these two rules could not occur both, because the filter badbody had sent the spam to quarantine 'Policy',
    there's no possible to dumplicate to qurantine 'good'.
    But it happens:
    Tue Jun 17 18:52:55 2008 Info: New SMTP ICID 26146919 interface InNet (10.68.2.161) address 61.135.132.136 reverse dns host websmtp.sohu.com verified no
    Tue Jun 17 18:52:55 2008 Info: ICID 26146919 ACCEPT SG ICP match .sohu.com SBRS 5.5
    Tue Jun 17 18:52:55 2008 Info: Start MID 10698519 ICID 26146919
    Tue Jun 17 18:52:55 2008 Info: MID 10698519 ICID 26146919 From: <mia_kma3998>
    Tue Jun 17 18:52:55 2008 Info: MID 10698519 ICID 26146919 RID 0 To: <swordhuihui>
    Tue Jun 17 18:52:55 2008 Info: MID 10698519 Message-ID '<10849536>'
    Tue Jun 17 18:52:55 2008 Info: MID 10698519 Subject '=?GB2312?B?1Pa807z7zsU=?='
    Tue Jun 17 18:52:55 2008 Info: MID 10698519 ready 1452582 bytes from <mia_kma3998>
    Tue Jun 17 18:52:56 2008 Info: MID 10698519 matched all recipients for per-recipient policy DEFAULT in the inbound table
    Tue Jun 17 18:52:56 2008 Info: MID 10698519 was too big (1452582/102400) for scanning by CASE
    Tue Jun 17 18:52:56 2008 Info: Start MID 10698528 ICID 0
    Tue Jun 17 18:52:56 2008 Info: MID 10698528 was generated based on MID 10698519 by duplicate-quarantine filter 'good'
    Tue Jun 17 18:52:56 2008 Info: MID 10698528 ICID 0 From: <mia_kma3998>
    Tue Jun 17 18:52:56 2008 Info: MID 10698528 ICID 0 RID 0 To: <swordhuihui>
    Tue Jun 17 18:52:56 2008 Info: MID 10698528 ready 1452584 bytes from <mia_kma3998>
    Tue Jun 17 18:52:56 2008 Info: MID 10698528 quarantined to "good" (duplicated by content filter:good)
    Tue Jun 17 18:52:56 2008 Info: MID 10698519 quarantined to "Policy" (message filter:flg1)
    Tue Jun 17 18:52:59 2008 Info: ICID 26146919 close
    The log shows the quarantine action of message filter take effect after the content filter action. I'm quite confused.
    Any suggestion?

    The original message was marked to go to the "Policy" system quarantine via the message filter. However, that message continues through the email pipeline. If no other action affects that message(i.e. dropped by Sophos anti-virus), then the system will move the message to the "Policy" quarantine as originally marked.
    However, in your case, the message was marked to be sent to the "Policy" system quarantine, and then it matched your content filter and did two things:
    1. spawned a copy of the original message and sent this new one to the "good" system quarantine. (see MID 10698528)
    2. the original copy was left alone and this one was sent to the "Policy" quarantine. If you had a drop() action, then it would have gotten dropped and you would have been left with the single copy from #1 (see MID 10698519)
    What was the intended behavior you were trying to achieve?
    Here are some references that may help:
    1. Where can I see a diagram of the IronPort email pipeline?
    You can find a diagram of the queue sequence if you click on the Help
    link in the top right of the web interface - it takes a while for it to
    load. Find the section "Understanding the Email Pipeline" and then
    under that "Overview: Email Pipeline".

  • Exchange server 2013 content filter rejecting all incoming messages as spam.

    Hello All,
    Today out of the blue our Exchange server 2013 install started rejecting any inbound message as spam. It first started with only one user not being able to receive any mail because of this anomaly and
    then after 12 or so hours all users were getting their mail rejected.
    I currently had the threshold set to 5 on external messages only. Internal is disabled.
    I have tried setting the threshold to 8 and 9, and rebooted the server after restarting
    all services just to make sure everything reset. Even dished out a IISRESET just in case. Whatever I tried still does not work.
    The install is a stand alone server facing the outside world (no edge server) living
    in a 2 domain controller environment with a share point farm thrown in (ESXI5.5 environment)
    Everything works just fine and dandy if I disable the content filter all together. Not seeing anything in the application logs out of the ordinary. Everything was working great and the same settings I used on this server worked well for a totally different
    server that runs just fine.
    Any ideas?
    fr0stsp1re

    RunspaceId                            : 87157b62-a061-436b-8fb9-dab446be3473
    Name                                  : ContentFilterConfig
    RejectionResponse                     : Message rejected as spam by Content Filtering.
    OutlookEmailPostmarkValidationEnabled : True
    BypassedRecipients                    : {}
    QuarantineMailbox                     :
    SCLRejectThreshold                    : 6
    SCLRejectEnabled                      : False
    SCLDeleteThreshold                    : 9
    SCLDeleteEnabled                      : False
    SCLQuarantineThreshold                : 9
    SCLQuarantineEnabled                  : False
    BypassedSenders                       : {}
    BypassedSenderDomains                 : {}
    Enabled                               : False
    ExternalMailEnabled                   : True
    InternalMailEnabled                   : False
    AdminDisplayName                      :
    ExchangeVersion                       : 0.1 (8.0.535.0)
    DistinguishedName                     : CN=ContentFilterConfig,CN=Message Hygiene,CN=Transport Settings,CN=Smith And
                                            Smith,CN=Microsoft
                                            Exchange,CN=Services,CN=Configuration,DC=XXXXXXXXXXX,DC=com
    Identity                              : ContentFilterConfig
    Guid                                  : 8f86e0b6-da37-42d3-b7cd-b9635b7db271
    ObjectCategory                        : XXXXXXXXXXXXXXXXXXX/Configuration/Schema/ms-Exch-Message-Hygiene-Conten
                                            t-Filter-Config
    ObjectClass                           : {top, msExchAgent, msExchMessageHygieneContentFilterConfig}
    WhenChanged                           : 5/28/2014 12:15:21 PM
    WhenCreated                           : 5/1/2014 4:17:55 PM
    WhenChangedUTC                        : 5/28/2014 7:15:21 PM
    WhenCreatedUTC                        : 5/1/2014 11:17:55 PM
    OrganizationId                        :
    OriginatingServer                     : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    IsValid                               : True
    ObjectState                           : Unchanged
     This is what it is set at now. Completely disabled. It worked fine for quite some time filtering out spam pretty nicely then one day everyone's mail was being rejected as spam by the content filtering agent. I know of someone else who also had this
    issue except their box was running 2008R2 with EX2007. They too disabled the content filter as it was giving them too many problems with mail being rejected.
    fr0stsp1re

  • Exchange 2013 Content filter agent quarantined message: wrong address appears when I click "Send Again"

    Hello,
    This is a strange one. I have Exchange 2013 and outlook 2013 and I have been using the content filter agent as a layer of spam protection since we were on 2008 and 2007. I redirect all my spam to a quarantine mailbox and examine it daily for false positives.
    When I find one I click "Send Again" from the message in the quarantine mailbox to forward it on to the original sender. Normally Oulook automatically populates it with the original recipient. Today I noticed one that, for some reason, inserted "groupwise-"
    in the front of the address(so for example "[email protected]:3:1") This concerns me as there is no such address and I have no idea where it is pulling this address from. I don't
    use groupwise software. The quarantine mailbox has info in a postmaster and abuse reporting email. It shows the address correctly as "[email protected]" Only when you click "Send Again" does it
    insert this groupwise address. Any ideas why?
    This has only happened on one email so far.
    Thanks.

    Hi,
    I noticed that the issue happened when you released quarantined messages to their intended recipients by using the Send Again feature in Microsoft Outlook.
    Does the issue happen to all quarantined mailboxes. Please confirm if the messages have been sent to the intended recipients successfully or sent failed with NDR returned because of the wrong email address.
    Please try to
    disable the mailbox quarantine then enable to check whether the issue persists. Also make sure there is no third-party program installed in Exchange server and local machine for quarantine mailboxes.
    Regards,
    Winnie Liang
    TechNet Community Support

  • Can I set up a Content Filter that is Time/Date stamp dependent?

    My company would like to add an additional disclaimer text during Holidays where the company is closed.  It will say something like: "In observance of the 'XYZ' holiday, our offices will be closing at 3:00 PM on Friday, December........ and will reopen at 8:30 AM Monday.......".
    I was wondering if there is a way to set up conditions in an Outgoing content filter to only include that text if the email is sent between certain dates.
    This would allow me to set up the filters prior to the holidays and not have to manage them manually.
    I tried to do it via Exchange Transport rule, but I can't find a time/date dependent condition for the rules in Exchange.
    Thanks,
    Rachel    

    Hi Rachel,
    there is no way to archive this directly in content filters, an indirect way would be to use a message filter that adds an additional header (i.e. X-mas: true) during a specific period. For that, message filters provide the 'date' rule, i.e
    HolidayHeader:
    if ((date > '12/20/2012 13:00:00') and
         (date < '12/28/2012 12:00:00'))
    insert-header('X-mas', 'TRUE');
    You'd then create an outbound content filter matching on this header and inserting the specific footer if the header exists. Or, of course, you could have that action in the message filter already, however in that case you need additional conditions to make sure the rule applies on outbound messages only.
    Hope that helps,
    Andreas

  • Is it possible to exclude .PDF file from Email Message body ?

    Hello Friends,
    I am sending e-mail from one program with attachment of EXCEL file.
    I am using following function SO_NEW_DOCUMENT_ATT_SEND_API1
    I am getting body of the message as a separate .PDF file.
    Even I want in real message body.
    <REMOVED BY MODERATOR>
    Regards,
    NVM
    Edited by: Alvaro Tejada Galindo on Dec 28, 2007 7:47 AM

    NB - the "data" that is returned by these classes is the data as defined in an adobe form - it doesn't return the content of non-form PDF documents.
    The PDF must be an interactive form ( although that doesn't restrict you to using the SAP process for creating the form is my understanding - but I could be wrong. )
    Edit - I was wrong! ONLY PDF documents that have been created by the ADS can have data extracted using these classes. So unless you are using Adobe interactive forms - then you will get no value from this functionality - and if you're using AIF then you're probably just use the standard UI element
    Edited by: Chris Paine on Oct 26, 2010 6:04 PM

  • Single page PDF file in mail always appears in message body, instead of as an attachment, contrary to a multiple page PDF. Why?

    When sending a single page PDF file in mail, it always appears as an open file in the message body. Multiple page PDF files appear as attachments. Why the difference and how to change the behavior of single page PDF files so that they appear as attachments instead of open files?

    Hello billsbs,
    Welcome to the Apple Support Communities!
    I understand that when you add a PDF to mail you see its entire contents, but when you add two or more pages Mail shows them as a document icon. To change this behavior for that specific email, please follow the instructions in the attached article. 
    Mac OS X Mail: About PDF attachments
    Have a great day,
    Joe

  • Content Filter - attachment stripping logic not working like I think it should

    Hello,
    I am working on a content filter for stripping file attachments - my logic is this:
    Condition: If File Type does NOT EQUAL file type Documents: attachment-filetype != "Document"
    Action: Strip File Attachment by File Info: drop-attachments-by-size(0 bytes) 
    My thought is that files that are not word docs, "test.ZIP" for example, would match the condition of not being a document. The match specifies that the action should then be performed on it - strip the attachment if it is over 0 bytes, which would be a match to any file. 
    Right now, it strip anythings, documents included...its like the condition does not exist. I considered using Message Filters at first, but I need to provide a replacement message with each attachment I strip. Thanks in advance for your help! 

    Hey Daniel
    Your understanding is correct to a point.
    The condition you set is correct, it will look for emails where attachments are NOT document files according to their mime structure.
    Once this condition is met (IE: test.zip)
    it will fall to the action
    Your action however is set to drop all attachments greater than 0 bytes.
    So for a setup like this I would suggest.
    First content filter:
    Attachment filetype is equal to "document"
    Action for this content filter :  skip remaining content filters
    Second content filter:
    (Either no condition or Attachment filetype is NOT "document")
    Action -> Strip if size greater than 0
    The reason why all attachment filetypes are being stripped and even document is the condition simply states what needs to be seen to trigger this action
    But this action is not set to exempt document files but to strip them all

  • How to send HTML as message body using SMTP

    I need to send HTML formatted emails. I used the Report Generation Toolkit to build my HTML document and make sure I had all of the formatting right. Then I modified the Save Report To File.vi to also give me the HTML text string on an output connector and I wire this string to the message input on the SMTP Email Send Message.vi.
    I receive the email OK, but all I see is the HTML code in the message body. What can I do to make sure that the email displays the message correctly.
    I use Outlook and I know it will receive and display HTML emails, I get them all the time.
    I would appreciate any help.

    Hi Dgw,
    it is similar. You must change message MINE content-type to "text/html" type. Because everyone document in email protocol have set MINE content-type. It is inforamtion for email servers and for email cients (Thunderbird, Outlook and etc.)
    For sendning mail with attachments you must use and modified "SMTP Send Multiple Attachments.vi" - if you can do backup of this VI and subVIs. Open Diagram of "SMTP Send Multiple Attachments.vi" after "SMTP Send Multiple
    Attachments Message.vi" and ther is VI "MIME Send Data Attachment.vi" - have control "MIME content-type" but code from NI don't use it.
    And like as my previous message, create new string control "MINE content-type" and take out this control to "main" Email VI.
    And embedd
    ed file you set up in control-cluster "attachments". I don't test it, but I mind thet must working :-)
    Have nice day
    JCC
    Attachments:
    email.jpg ‏70 KB

  • How to include original message body in the reply to a workflow notificatio

    Hi,
    I have a requirement from my clients.
    Standard Functionality: When a Manager clicks on the APPROVE (button / link) to approve a workflow notification from a mailing application, a (response) mail gets composed to the Workflow Mailbox with the NID and Access Key. The content as shown below.
    ===========================
    Action: 'Approve'
    Comments: ''
    NID[3699/874478985@WFMAIL3]
    ===========================
    Requirement:
    The requirement is that, when the Maanger clicks on Approve / Reject, the original message body also has to get populated into the response mail along with the NID and Access Key.There would be audits conducted(looking into the workflow mail box) on the approval / rejection decisions taken by the users. The intention of getting the originial message body is to identify, to which notification(or letter) this action was taken. Me, being a Technical person can get it from the Notification Id in the workflow mail box, but the people conducting the Audit cant identify that. So, I need to get the original message body into the response. This is the reason for the requirement.
    Actually, I dont need the whole message body, but the value in an URL attribute, which is one of the SEND attributes of the notification in question.
    fyi, It is a VOTING ACTIVITY and hence, I donot know how many users would get the notification.
    I tried creating a RESPONSE Attribute(I understand that, a response attribute is an attribute where I accept inputs from the user), but couldnt assign the value to that attribute.
    Regards
    Anil K A

    Sadly, I believe this will require a bit of development to make it happen. The project I'm on now...we are finding that to get it to do what we want it to do, a development to customize the email message to include all the case fields is required.
    D

  • MessageBody.txt file instead of actual message body when attachment="true"

    Hi guys,
    Using XMLP 5.6.3 with EBS (with patch 5968876 applied)
    Trying to send out a PDF report via email using the bursting engine. We need the report to be attached but the message body to show in the actual message body window of the client.
    Right now, instead of that we get the message body as an attachment called messageBody.txt
    Here are some relevant lines of my control file:
    <xapi:email server="email.server" port="25">
    <xapi:message id="123" to="[email protected]" attachment="true" content-type="html/text" subject="My subject">Dear customer,
    This is the actual message body</xapi:message>
    </xapi:email>
    </xapi:delivery>
    <xapi:document key="${TRX_NUMBER}" output="${TRX_NUMBER}" output-type="pdf" delivery="123">
    If I set attachment="false" then I get the message body but no PDF file.
    Any ideas?
    Thanks,
    Michel

    I posted this as an issue (the attachment does attach but a blank txt box also attaches) a long time ago, but didn't get a response from either Tim or Development. Here is the thread with further info.
    Re: XMLP OA ROLLUP PATCH 5.6.3 bursting email creates blank messageBody.txt
    Rob
    http://www.scnet.com.au

  • Sending email  with message body contain data  in table   displayed in one

    Hi,
    I have one jsp page where I am dispalying the table data retrieved fron database.
    Now i am trying to send this table as message body of the mail to the user.I am doing same stuff last from six days but unable to send such data.
    Please help me Sir,as i am newbie here.
    Here is an jsp page.
        Document   : evaluationeventtable
        Created on : Jul 24, 2008, 6:52:37 PM
        Author     : user1
    --%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@ page language ="java" %>
    <%@ page import="java.sql.*, javax.sql.*, javax.naming.*,java.io.*,java.util.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>IGIDR</title>
            <link rel="stylesheet" href="../styles/styles.css" type="text/css">
        </head>
        <body>
             <table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td><%@ include file="/includes/logohead.jsp" %></td>
    </tr>
    <tr><td><%@ include file="/toplinks.jsp"%></td></tr>
    <tr>
    <td width="100%" valign="top">
    <table width="100%" cellspacing="0" cellpadding="0" border="1" borderColor=#000066>
        <tr>
    <td width="80%"> 
        <%  int QNO;
             String message=null;
             //String message1=null;
             //String message2=null;
             String noA,noB,noC,noD;                
            String ID=request.getParameter("id");       
            String EVENTID=request.getParameter("event");       
            Connection connection = null;
            Statement st = null;
            Statement st1 = null;
            Statement st2 = null;
            Statement st3 = null;
            Statement st4 = null;
            Statement st5 = null;
            ResultSet rs= null;
            ResultSet rs1= null;
            ResultSet rs2= null;
            ResultSet rs3= null;
            ResultSet rs4= null;
            ResultSet rs5= null;
            Class.forName("com.mysql.jdbc.Driver");
            Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/mynewdatabase","root", "root123");
                           st=con.createStatement();
                    try  {              
                      rs = st.executeQuery("SELECT * FROM Questionbank where Questionid='"+ID+"'");
                   %>
                <table border="1" cellpadding="2" cellspacing="3" bgcolor="#E6E6FA" align="center"><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>
                 <%  message="<table border=1 cellpadding=2 cellspacing=3 bgcolor=#E6E6FA align=center><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>";%>
                   <%
                  while ( rs.next() )
                            //String NO=rs.getString("Qserialno");
                            //session.setAttribute("no",NO);
                            //String NAME=rs.getString("questionname");
                            //session.setAttribute("name",NAME);                                    
                       %>
                       <tr><td><%=rs.getString("Qserialno") + "." + rs.getString("questionname")%></td>
                       <%
                        message=message+"<tr><td>"+rs.getString("Qserialno") + "." + rs.getString("questionname")+"</td>";
                       st1=con.createStatement(); 
                       try
                          rs1=st1.executeQuery("select count(*) as total  from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='A'");
                         rs1.next();
                         noA=rs1.getString("total");
                         session.setAttribute("NOA",noA);
                          rs1=st1.executeQuery("select count(*)  as total from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='B'");
                       rs1.next();
                         noB=rs1.getString("total");
                         session.setAttribute("NOB",noB);
                          rs1=st1.executeQuery("select count(*) as total  from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='C'");
                        rs1.next();
                         noC=rs1.getString("total");
                         session.setAttribute("NOC",noC);
                          rs1=st1.executeQuery("select count(*) as total  from final where questionid='"+ID+"'and Eventid='"+EVENTID+"'and Qserialno='"+rs.getString("Qserialno")+"'and Answer='D'");
                          rs1.next();
                         noD=rs1.getString("total");                   
                         session.setAttribute("NOD",noD);
                         message=message+"<td>"+noA+"</td><td>"+noB+"</td><td>"+noC+"</td><td>"+noD+"</td></tr></table>";
                         %>                     
                     <td><%=noA%></td><td><%=noB%></td><td><%=noC%></td><td><%=noD%></td></tr>
                   <%        
                         } finally
                               if (rs1 != null)
                                   rs1.close();
                                   rs1 = null;
                               } if (st1 != null)
                                   st1.close();
                                   st1 = null;
                                       finally
                               if (rs != null)
                                   rs.close();
                                   rs = null;
                               if (st != null)
                                   st.close();
                                   st = null;
                                   con.close();
                      %></table>   
                      <table align="center" width="50%" cellspacing="0" cellpadding="0" border="1" borderColor=#D2691E>
                      <form name="sendmail" action="/student/servletmail" method="POST">
                       <tr class="CellColor">
              <td>To</td>
              <td class="CellColor" width="1%">
              </td>
              <td class="CellColor">
                   <input type="text" name="to" size="25" value="">
              </td>
                    <td>From</td>
              <td class="CellColor" width="1%">
              </td>
              <td class="CellColor">
                   <input type="text" name="from" size="25" value="">
              </td>
         </tr>
            <input type="hidden" name="message" value="<%=message%>">
            <tr class="CellColor">
              <td class="CellColor" colspan="9" align="center">
                   <input type="submit" name="tn1" value="Send" >
              </td>
         </tr>   
      </form></table></td></tr></table>
                  </table>
                         </body></html>    And here is an servlet where i am trying to send the mail
    package com.student.igidr.test;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.event.*;
    import javax.mail.internet.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author user1
    public class servletmail extends HttpServlet
            public  void doPost(HttpServletRequest request,HttpServletResponse response)
                                      throws ServletException, IOException
            PrintWriter out=response.getWriter();
            response.setContentType("text/html");
            try
               Properties props=new Properties();
               props.put("mail.smtp.host","webmail.igidr.ac.in");   //  'localhost' for testing
       Session   session1  =  Session.getDefaultInstance(props,null);
               String s1 = request.getParameter("to");
               String s2 = request.getParameter("from");
               //String s3 = request.getParameter("sub");
               String s4 = request.getParameter("message");
              // out.println(s4);
         Message message =new MimeMessage(session1);
         message.setFrom(new InternetAddress(s2));
          message.setRecipients
                 (Message.RecipientType.TO,InternetAddress.parse(s1,false));
              // message.setSubject(s3);
               message.setText(s4);       
              message.setContent(s4,"text/html");
               Transport.send(message);
               out.println("mail has been sent");
            catch(Exception ex)
               System.out.println("ERROR....."+ex);
    }I am using the message variable to send the message also as input variable in servlet.
    Whether it is write Way to represent hole table body into message variable in jsp page.
    Please help me.
    Thanks and Regards
    haresh
    Edited by: HARSHAL_GURAV on Aug 13, 2008 11:15 PM
    Edited by: HARSHAL_GURAV on Aug 13, 2008 11:56 PM

    Hi bshannon ,
    Thanks you very much for your reply.
    I am trying to send html formated mail to the user.
    The message body contains the table that is displayed in above jsp page as:
    <table border="1" cellpadding="2" cellspacing="3" bgcolor="#E6E6FA" align="center"><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>
    <tr><td><%=rs.getString("Qserialno") + "." + rs.getString("questionname")%></td>
    <td><%=noA%></td><td><%=noB%></td><td><%=noC%></td><td><%=noD%></td></tr>In above code I am displaying the data from table i jsp page in table format. The data is related to analysis of particular event and i am trying to send this data as message body of the email.
    As table displayed in html form can you assist me in how to send html data?
    I am using variable message to store all this table data .
    <%  message="<table border=1 cellpadding=2 cellspacing=3 bgcolor=#E6E6FA align=center><tr><th>Questions</th><th>A</th><th>B</th><th>C</th><th>D</th></tr>";%>
    message=message+"<tr><td>"+rs.getString("Qserialno") + "." + rs.getString("questionname")+"</td>";
      message=message+"<td>"+noA+"</td><td>"+noB+"</td><td>"+noC+"</td><td>"+noD+"</td></tr></table>";i am sending this variable through form.At servlet I am retrieving it like:
    String s1 = request.getParameter("to");
               String s2 = request.getParameter("from");
               //String s3 = request.getParameter("sub");
               *String s4 = request.getParameter("message");*Will this possible ?
    Please help meas i am troubling same with last from 7-8 days.
    I had gone through Faqs but unable to collect required information.
    Thanks and Regards
    Haresh
    Edited by: HARSHAL_GURAV on Aug 15, 2008 9:22 PM

Maybe you are looking for

  • Issue Related to GL mapping

    Hi, Pls let me know where I can assign the GL against any wage type??Pls elaborate all the steps. Also let me know From where I can get the Balance sheet & Profit & Loss Account GL mapping against any wage type.as their will be two GL assigned agains

  • Why is my connection timing out on a reinstall of OS X on new SSD?

    Hello, I'm hoping someone can help me with a fresh reinstall of OS X on a MacBook Pro. My HDD died, so I installed a new SSD. The physical installation went fine. I booted into Internet Recovery by holding Option to get to the boot menu. From there,

  • Why does the keyboard hide my iMessages?

    My new 6+ and ios8 is making it impossible for me to see the recent imessages.  I have to exit the app and come back so the keyboard goes away.  I can 'drag' them up, but I cannot get to the bottom. Any help appreciated. Thanks

  • Error 16 , the help that you suggest does not work!

    I had Acrobat XI monthly subscription, computer crashed, when I open my Adobe ID to download on new computer XI is not there anymore it is DC and it downloads but I get error 16 when I try to open it.  Have Windows 7.  I have done all the suggestions

  • Issue with runbook and the "&"

    I was working on a Service request/ Runbook for creating a new Shared mailbox in exchange online.  Everything worked fine when I submitted the request(s). Then I had another team member try it out on a real request and things did not work as expected