Cannot Mail Subject

why the subject is null?
can anyone help me. thanks!
The next is my program:
import javax.mail.FetchProfile;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Store;
import com.sun.mail.pop3.POP3Message;
public class Reciever {
     public static void main(String[] args) throws Exception{
          Session session = Session.getInstance(System.getProperties());
          Store store = session.getStore("pop3");
          store.connect(args[0],args[1],args[2]);     
          Folder folder = store.getFolder("INBOX");
          folder.open(Folder.READ_WRITE);
          System.out.println(folder.exists());
          Message[] messages = folder.getMessages();
          FetchProfile fp = new FetchProfile();
          fp.add(FetchProfile.Item.ENVELOPE);
          fp.add(FetchProfile.Item.FLAGS);
          fp.add("X-mailer");
          folder.fetch(messages,fp);     
          for (int i = 0; i < messages.length; i++) {
               POP3Message me = (POP3Message)messages;                    
               me.writeTo(System.out);
               System.out.println(me.getSubject());     
          folder.close(true);
          store.close();
the result after run it:
This is a multi-part message in MIME format.
------=_NextPart_000_0039_01C356BF.8F621D20
Content-Type: text/plain;
     charset="gb2312"
Content-Transfer-Encoding: base64
VGhpcyBpcyBhIG1haWwgZnJvbSBDaGVuLg==
------=_NextPart_000_0039_01C356BF.8F621D20
Content-Type: text/html;
     charset="gb2312"
Content-Transfer-Encoding: base64
PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv
L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgaHR0cC1lcXVpdj1Db250ZW50LVR5cGUgY29udGVu
dD0idGV4dC9odG1sOyBjaGFyc2V0PWdiMjMxMiI+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNi4w
MC4yODAwLjExMDYiIG5hbWU9R0VORVJBVE9SPg0KPFNUWUxFPjwvU1RZTEU+DQo8L0hFQUQ+DQo8
Qk9EWSBiZ0NvbG9yPSNmZmZmZmY+DQo8RElWPjxGT05UIHNpemU9Mj5UaGlzIGlzIGEgbWFpbCBm
cm9tIENoZW4uPC9GT05UPjwvRElWPjwvQk9EWT48L0hUTUw+DQo=
------=_NextPart_000_0039_01C356BF.8F621D20--
null

Are you asking why the subject of an incoming message is null? Probably because the sender didn't put a subject on the message.
Or if that wasn't your question, ask it differently.

Similar Messages

  • Purchase order by e-mail: changing the e-mail subject

    Hello all,
    We are sending are purchase orders to the vendors by e-mail.
    I would like to know how can I change the e-mail subject to a subject of my choice (for instance the PO number, etc.).
    Thanks for your help,
    Sivan

    Hi,
    You can  change the e-mail subject to a subject of your choice by following way.
    If you want to send a purchase order as (external) mail, for example, to a
    vendor, you have to maintain the mail title in the condition record for the
    output type (for example in Transaction MN05) on the 'Communication method' tab
    page. Enter the mail title in the 'Text for cover page' field. You cannot
    maintain an additional mail text.
    Hope this will help u,
    Deepak

  • Mail subject storage table

    Hi,
        In one program sending mail.When I run background job ,job will created.
        In another report I am displaying all background jobs in perticular date. Now I want that mail subject has to display correspong to perticular job.
       Please tell me any mail title storage table or FM.I checked SOOD,SOFD,SOFIND. No use.
    Thanks,
    Suma.

    Hi Suma,
    I dont think what you are doing is correct. There is no direct link between SOOD and TBTCP. So you cannot fetch the records with the way you are doing now. One possible way could be to find the program name which triggers the email and link it with the job name using the program name. Am still trying to figure how to link the email triggered with that of the program name. Lets wait and see if anyone else can suggest a better and alternative approach for this.
    Vikranth

  • My e-mail subject line is repeated when I try to open an e-mail

    My e-mail subject line is repeated when I try to open an e-mail, so I have to open this line too, before I can read my e-mail. It takes up alot of space & means I have to do another unnecessary thing for EVERY e -mail ! Then I have to CLOSE it twice to get out! What is happening?

    I am having the exact same problem with my Macbook Pro, all of a sudden the password started rejecting and I cannot use that gmail account.  This appears to be a bug.  The quick fix was to set up another gmail account and forward the mail from the old gmail account to the new gmail account that works with the IMAP service.  This way the mail from the gmail account with the rejected password will still come through and appear in MAIL.

  • Mail Attachment with attachment name = mail subject name

    Hi,
    I am using the mail adapter and today I am using hard codes attachment names using the MessageTransformBean. I have read the blog /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution about dynamic filenames but how do I get the eMail subject as a viriable to create the attachment?
    Thanks
    Juergen

    Juergen my weblog was the simplest suggestion to your issue - you can put the mail subject anywhere in
    message get it (and remove) in the adapter module
    you can also try to get the
    Adapter-Specific Message Attributes from the adapter module 
    http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/content.htm
    but I'm not sure it the second solution works with adapter modules - but you can do an easy check
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • SO_NEW_DOCUMENT_ATT_SEND_API1 issue related to length of MAIL SUBJECT

    Hello Experts,
    when i am using 'SO_NEW_DOCUMENT_ATT_SEND_API1' FM to send an external mail in HTML format, i want the lengh of MAIL SUBJECT almost 70 character. But it is allowing me to display only
    50 characters ( lenght of field OBJ_DESCR ).Can i accomodate heading more than 70 characters.
    Regards,
    Rushikesh

    try
    Check this SAP note
    Note 698087 - User-defined mail title without length restriction
    CL_BCS->SET_MESSAGE_SUBJECT
    Bhanu

  • Alert management with custom mail subject

    Hello,
    I defined a business process, with a control step that throws an alert with a specific message "Error in &MessageTypeFound& " ( &MessageTypeFound& being a container element filled in in a previous step ).
    When I look at the e-mail that the alert manager sent, I can see the alert, with the variable properly filled in, so the result in the mail-body is: "Error in WMMBXY".
    Now, as a mail subject, I want the same message. In the Alert Category Definitions, I need to fill in the title and this will be used as mail subject.
    To be able to use variables in this title, I need to define container elements in the alert category definition. How can I pass the Business Process variable ( &MessageTypeFound& ) to this container for the alert definition ? (So I can use this container element for my dynamic variable in the subject of the alert mail)
    Any ideas are welcome !
    Thanks

    Hi Frederik,
    Unfortunately the functionality you want is simply not available ... or well it is but its not implemented very good by SAP.
    The workflow step that generates an alert does has a container element 'SHORTTEXT' which can hold placeholders and which is translated into the title of the alert message/mail.
    However, the field is defaulted with the text 'Process &_WORKITEM.WORKITEMID&' when being executed via BPM ...
    I tried to overwrite it by setting my own 'SHORTTEXT'container element within the BPM but that does not work ...
    Regards,
    Steven
    ( Tried everything on SP14 ... maybe something changed in SP15 ... )

  • Mail subject modification for smart-form SMIV

    Hi Experts,
    We have implemented ServiceDesk in Solution Manager 7.1 SPS 08 & are using automatic notifications to be generated as alert emails to the customer key users / service desk support team / message processors etc.
    We are using Actions under transaction SPPFCADM, which is using smart-form AI_CRM_IM_SHORT_TEXT_LINK_FORM for the email content.
    We need to modify the notification mail subject as follows - 
    Current Mail Subject – 80000xxxxxx : <Incident Description>
    Required Mail Subject – 80000xxxxxx : <Incident Description> : <Incident Status>
    Can you please suggest, how this can be achieved? What modifications are needed in smart form for the same?
    Best Regards,
    Tanmeya

    Hi Tanmeya,
    Go through the following Links, here u can find example with step
    by step.
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    Check these links also.
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    https://scn.sap.com/thread/499311

  • Mail Subject getting cut shorted

    Hi frnds
    In my mail subject i see that the subject is getting cut shorted like
    "Contract Title 5600000422 Actual Spend is now 91" . I am only getting this message in subject but the original is some what bigger than this .
    Is there any limitation to that .
    Thanks
    ROhit

    Hello Rohit,
    There was actually a limitation in previous releases, for external mails it is 50 characters. Check note 975947, it will solve your problem.
    Regards
    Andre Sousa

  • E-mail subject (in action)

    hello All.
    I have an action in billing. That action is a e-mail and use a form (smartform) to generate an invoice (pdf).
    When the system sends the e-mail, its sends only the pdf. I need change de subject of e-mail because now the subject of the e-mail is the name of the form (Z_INVOICE) and I want a diferent subject. Aditionally, i want to send some text in the e-mail body.
    Does anybody know how to do this?.
    Thanks very much for your cooperation.
    Mauricio.

    Thanks venkata Raja Sundaragiri.
    I have the text that I need attach in the e-mail, but i have not been able to put it in the e-mail body and the e-mail subject. How can I do?
    Is there a variable or something like that in the Smartforms to do this?
    I have some kind of action or processing method that i have to customize or can i use the same action to do both things (send email in pdf and attach the body and the subject)??
    Thanks again,
    Mauricio

  • Dynamic mail subject in File2Mail Scenario

    We are doing File2Mail scenario. We r sending 5 files in 5 mails with 5 diff subjects by MAIL adapter.
    Can anyone guide me how to send 5 files as attachment in one single mail with different mail subjects :
    File names are - Employee_Leave,Base,Super,Loss,Profit.

    Hey,
         you can use dynamic addressing wherein you can provide the mail related information in your mapping.
    for example the to, from, subject and content.
    so you can map these fields form the input structure or you can have a constant to map it.
    refer to this blog it will really help.
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    the only differerence in your case is that you need file as attachment so mark the keep attachment field.
    it will ask you for a mail structure.
    use this structure as your target structure.
    <?xml version="1.0" encoding="utf-8" ?>
    - <!--
    SAP takes no position regarding the validity or scope of any intellectual property or
    other rights that might be claimed to pertain to the implementation or use of the
    technology described in this document or the extent to which any license under such
    rights might or might not be available; neither does it represent that it has made any
    effort to identify any such rights.
    Copyright © SAP 2003-2004. All Rights Reserved.
    This document and translations of it may be copied and furnished to others, and derivative
    works that comment on or otherwise explain it or assist in its implementation may be
    prepared, copied, published and distributed, in whole or in part, without restriction of
    any kind, provided that the above copyright notice and this paragraph are included on all
    such copies and derivative works. However, this document itself does not be modified in
    any way, such as by removing the copyright notice or references to SAP.
    This document and the information contained herein is provided on an u201CAS ISu201D
    basis and SAP DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
    ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
    IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
      -->
    - <xs:schema targetNamespace="http://sap.com/xi/XI/Mail/30" xmlns:xi="http://sap.com/xi/XI/Mail/30" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    - <!--
    Mail
      -->
    - <xs:element name="Mail">
    - <xs:annotation>
      <xs:documentation>Mail package for XI - Mail Adapter</xs:documentation>
      </xs:annotation>
    - <xs:complexType>
    - <xs:sequence>
      <xs:element name="Subject" type="xs:string" minOccurs="0" />
      <xs:element name="From" type="xs:string" minOccurs="0" />
      <xs:element name="To" type="xs:string" minOccurs="0" />
      <xs:element name="Reply_To" type="xs:string" minOccurs="0" />
      <xs:element name="Content_Type" type="xs:string" minOccurs="0" />
      <xs:element name="Date" type="xs:dateTime" minOccurs="0" />
      <xs:element name="Message_ID" type="xs:string" minOccurs="0" />
      <xs:element name="X_Mailer" type="xs:string" minOccurs="0" />
    - <xs:element name="Content" minOccurs="0">
    - <xs:annotation>
      <xs:documentation>any type</xs:documentation>
      </xs:annotation>
      </xs:element>
      </xs:sequence>
      <xs:attribute name="encoding" type="xs:string" />
      </xs:complexType>
      </xs:element>
    - <xs:element name="MailReceipt">
    - <xs:annotation>
      <xs:documentation>Mail Receipt for XI - Mail Adaper</xs:documentation>
      </xs:annotation>
    - <xs:complexType>
    - <xs:sequence>
      <xs:element name="Server" type="xs:string" />
      <xs:element name="Format" type="xs:string" />
      <xs:element name="UseMailPackage" type="xs:boolean" />
      <xs:element name="Encoding" type="xs:string" />
      <xs:element name="Subject" type="xs:string" minOccurs="0" />
      <xs:element name="From" type="xs:dateTime" minOccurs="0" />
      <xs:element name="To" type="xs:string" minOccurs="0" />
      <xs:element name="Date" type="xs:dateTime" minOccurs="0" />
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:schema>
    reward points if useful.
    regards,
            Milan.

  • E-mail subject line truncated to 50 characters

    Hi,
       While sending E-mail from workflow the E-mail subject line truncated to 50 characters. Already we are having Note 958426  with our patch SAP_BASIS - SAPKB70011. How to rectify this?
    Regards
    Sam

    Sam,
    We are on SAPKB70012 and are having this problem too.  Have you been able to resolve this?  If so, how?
    Thanks!
    Paul

  • Chinese problem in Java Mail "Subject"

              I got a problem in displaying the Chinese mail subject as described below
              1. here is the code
              Message msg = new MimeMessage(session);
              msg.setFrom(new InternetAddress(from));
              msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
              msg.setSubject(subject);
              msg.setSentDate(new Date());
              msg.setContent(content, "text/plain");
              Transport.send(msg);
              2. My env is
              Windows 2000
              weblogic 7
              3. My problem is
              the chinese character in the mail context is OK but the subject in the mail is
              like this "?????"
              Can someone give me the clue ? Thanks a lots
              

    You need to be identified by stmp server :
    // Send message with authentication!
    Transport tr = session.getTransport("smtp");
    tr.connect(MailHost, user, pass);
    message.saveChanges(); // don't forget this
    tr.sendMessage(message, message.getAllRecipients());
    tr.close();
    Read JavaMail Faq please!

  • Outlook mail app display arabic mail subjects and folders names as "??????"

    outlook mail app display arabic mail subjects and folders names as "??????" , any way to solve this problem ? thanks

    Skydiver119 wrote:
    the ipad likely doesn't have a font to display the mails
    That's nonsense, if you look at the settings you will see you can put the entire device into Arabic if you want, as well as type and read Arabic emails and other docs.  The font is there, but for some reason the encoding is botched, either by the app or the place sending the email to the iPad.

  • Change outgoing mail subject

    Hi Guru's,
    I need to change the subject of the outgoing standad mail template dynamically by the comlaint id which i get it through the refernce field of the mail.
    or is there any way through which the refernce id can be copied in the mail subject.
    Thanks,
    regards,
    akshay ruia.

    settings - mail - account - outgoing mail server

Maybe you are looking for

  • I can't print from my Mac wirelessly

    I have to use the cord to print from my Mac.  But surprisingly others in my home can print to the HP Office Jet Pro 8600.  What gives? This question was solved. View Solution.

  • MATERIALIZED VIEW BECOMES INVALID AFTER REFRESH

    Hello All, I have wierd problem , In my enviroinment we have a MATERIALIZED VIEW ,which is refreshed by a sheduled DBMS_SNAPSHOT.REFRESH Job post the refresh it becomes invalid and every time we have to compile it manually ,Could anybody help with a

  • Record video no sound!

    Record video no sound! <Edited by Host>

  • Do not disturb mode still not working

    I have a iPhone 4S, iPad 3 and my husbands iPhone 5 and the do not disturb mode still doesn't work right. We have Verizon wireless for our carrier. Does anyone know a fix?

  • User-defined constructor

    How can I tell database designer to create user-defined constructors? I've not found any way to add the "constructor" keyword in front of function.