Generating email from text

Hi.
I have an email represented by a text (with headers, subject, attachement and so on). I would likt to generate a javax.mail.Message from it, so I can extract the headers and attachments more easily.
I tried to set up a fake Session and a MimeMessage and fill it using a FileDataSource by reading the text from a File, but it didnt work well.
Anyone know any examples or libraries that could help me here?
Thanks
-r

I found a solution to it. Thought I should post it here, in case someone else have the same problem. It worked making a fake Message, I just invoked some methods that didn't do anything, so I thought it had all gone wrong.
Imagine your email is stored in a String email :
InputStream in = new ByteArrayInputStream(email.getBytes());
MimeMessage mm = new MimeMessage(null, in);We have our message. Way easy...

Similar Messages

  • How can I generate email from report 6i.

    Dear Sir,
    When I click on e-mail button on report 6i (Win2k User) Generate following error:-
    Rep-4203 error occurred while a mail message.
    Rep-4220 There is a problem with the email subsystem.
    When I generate report from administrator then email generated no error occurred.
    Please help me how can I generate email from report 6i without administrator rights.
    Thanks and Regards
    Brij

    You can try this at form that calling your report;
    add_parameter(p_id,'DESFORMAT','HTML');
    hope this helps...
    defne
    ps: raporu cagiridigin form program units'ine, bu add_parameter'i eklersen, HTML olarak raporunu emailleyebilirsin...

  • Generating email from SAP

    Hi Experts,
    I am facing some issues while sending an email from SAP GUI 720 to the external email destination.
    This problem is reported by one of our customers.
    Customer is trying to generate a email from SAP. As apart of body of mail he is generating the contents which 
    contains single/double quotes by typing it from MS word.If that content having quotes is passed as body of mail ,the email
    generated from SAP is successful but the content was replaced with "#" instead of single /double quotes.
    NOTE:If we use the contents that was typed from vi editor or textpad, and passing it as body of mail. Single quote
    and double quotes works fine and can also view the entire body of mail .
    I would like to know the following points to analyze this problem:
    1. Is it the known issue? Is anyone has faced the same problem?
    2.As per my understanding, when we send email for SAP UI ,the request gets queued up and then sent to the SAP gateway.
    SAP gateway then sends it to the external email destination.
    Is there any way to check the what is the data sent to SAP gateway?
    I tried to check the Gateway traces but it does not log any data related to the email body message.
    3. Whether the data will get logged in SAP log files?If yes, what is the location?
    4. Whether we need to explicitely enable the SAP logs?
    Looking for some inputs from experts.
    Thanks,
    Aarati

    Found it
    I can see I can usr Fm SO_DOCUMENT_SEND_API1 for this
    Regards
    Morten Nielsen

  • Generate email from ABAP report.

    Hi Folks,
    I would like to know if it is possible to send email from to an external mail id from an ABAP report.
    If it is possible then what are detailed steps that needs to be taken in order to achive it. Also let me know how to attach files to the created email.
    Thanks,
    Imran

    FAQ, please search the forums before posting, do not ask the same question once again.
    Thread locked.
    Thomas

  • How to generate barcode from text field in adobe form???

    hello everyone,
    I'm new in this forum and I hope that there are people who can answer my question.
    I use Adobe Acrobat Pro 9. I have converted a Word template to a PDF template and everything works fine.
    I would like to generate a barcode of the contents of a text field (by the users), for example the following format 0123-A123456-11.
    I have tried in various ways but it has not worked. The barcode becomes unstructured and unreadable.
    Does anyone know how to do it step by step?
    Best regards!
    Nader from Sweden

    Hi,
    You can insert dynamic barcodes into your form using LC Designer. 
    You should do a search here as dynamic barcodes has been covered by by Steve Walker in detail. For example:
    BARCODE 128 - possibility of binding 2 data fields to the barcode
    Paperforms barcodes
    Using Barcode in Acroforms
    However one thing to bear in mind is that dynamic barcodes will not work in Reader unless the form has been Reader enabled using LC Reader Extensions ES2, which is a server product. Option 4 in this summary:
    Good luck,
    Niall
    Assure Dynamics

  • Generate email from program

    Hi All,
    Please help me satisfy the below requirement.
    I want to write a prog (SE38) for some conditions for the load status and then according to those conditions want to trigger an email through the same program. email should have some data related to load status.
    How to archive this!
    Thanks,

    Hi PVP,
    You can check this how to document if it fits your needs.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90215bba-9a46-2a10-07a7-c14e97bdb764
    For load status of infopackages , you could also check table RSDONE and RSMON.
    Regards,
    Sunmit.

  • How do you send an email from a J2ME application

    I am writing apps in J2ME and would like to generate emails in my apps, and send them to a printer, as a means of getting printed output from my apps.  Can anyone tell me how to do this please?

    You may get lucky here, but I think you'd be much better served asking your question in a developer's forum...if you google "J2ME developers forum" or similar (or even "generate emails from J2ME programs" you should be able to get to what you need.  
    Good luck, sounds like an interesting approach. 
    I am an HP employee.

  • I send an email from my Iphone to a friend.  My friend receives it on her Iphone, but as text message.  She replies and it goes back to my daughter's phone, a completely different email and phone number.  Why?

    I send an email from my Iphone to a friend.  My friend receives it on her Iphone, but as text message.  She replies and it goes back to my daughter's phone, a completely different email and phone number.  Why?

    We went through my friend's phone and my daughter's email and phone number are not in it.  I have never given my daughter's iphone number to my friend.  Is it something to do with gmail or my apple id?  My daughter (14) has been using my computer as her "base" for HER Iphone. 
    My friend does use her iphone number as an email address as well.
    For instance:  her phone number might look like this:  (493) 305-3958
    and her email address would look like this:  [email protected]
    If I Iphone/email my friend, she receives it as a text message.  Then if she replies to that text message, it goes to my daughter's phone and not mine.  It's completely crazy!  We searched her phone contacts and did not find my daughter's phone number anywhere or attached anywhere to mine.  Since when does Iphone emailing wind up in the text messaging area?

  • Just moved my email from entourage to Mail. Having real problems with getting my signatures to work properly. When adding in a small company logo, windows computers only receive signature as an attachment. Am sending email as Rich Text. Any ideas on a fix

    Just moved my email from Entourage to Mail. Having real problems with getting my signatures to work properly despite sending email as Rich Text.
    When adding in a small company logo to the signature, PC's / windows computers only receive signature and logo as attachments.
    I've tried all possible fixes I can find including getting a PC user to format the logo but no joy. Has anyone experienced this and any ideas on a fix gratefully received.

    Send it as html so the signature is an image source URL

  • Received emails from Verizon - Pictures do not show correctly and strange characters appear in text

    When I receive emails from Verizon users, embedded images do not display inline.  Each image(s) instead is displayed as a empty box with the red X boxed at the upper left.  The images are correctly displayed at the very end of the email.
    Additionally, dotted capital A's appears frequently within the text as well as other extraneous characters and symbols.
    Do I have an incorrect setting in Live Mail (Outlook express displays the same) or is it something Verizon is doing?  All of my other emails from different providers display properly.
    Thanks in advance for any assistance which might be offered.
    nosewiki

    I have the same problem rec eiving from a friend who uses verizon. I use aol and even opened it in Internet Exporer and the same thing happened. This is a programing glitch with verizon email. I get the text in the email but the white squares with an x and no image. I have to downlod the images and open it as an attachment. The problem is you look at the image without the text which might be describing the image. Very inconvient. The person sending the emal has to enable the rich text option . I am still looking on how to do it on Verizon email but since I don't have it I am having trouble finding a solution.
    Pokerj

  • When I send an email from Apple mail, it send inbedded links, not embedded, my font shows as plain text and signature sends as attachment??

    When I send an email from Apple mail, it send inbedded links, not embedded, my font shows as plain text and signature sends as attachment??

    inbedded is not a word.

  • After update iso 7.1 can not open all receiving  videos from email or text .i dont know what to do., after update iso 7.1 can not open all receiving  videos from email or text .i dont know what to do.

    Can not open all receiving videos from email and text ( iphone 4s) after update iso 7.1

    Can not open all receiving videos from email and text ( iphone 4s) after update iso 7.1

  • Help! I can send emails from my ipad2 that contain text - but they're unable to send if I attach any pictures! So frustrating! I have an iPhone

    Help! I can send emails from my ipad2 that contain text - but they're unable to send if I attach any pictures! So frustrating! I have an iPhone

    I have an iPhone & can send pictures via email without issue but I can't on ipad2. Any ideas why?? Thx!

  • Why do my text messages come back as MMS emails from Rogers?

    Sporadically I send an iMessage to family when they are not on WiFi
    And the reply does not come back as a text, but as a MMS email from Rogers.

    This suggests that one or both of you don't  have iMessage configured correctly in settings or you lack a data connection (cellular or WiFi) at both ends.  SMS doesn't use a data connection.
    Settings > Messages > iMessage > ON for both phones?  Were the messages sent to and from active iMessage email or numbers?
    Are either of you able to iMessage other iPhones?

  • Change 'new form submission' text when receiving email from contact form.

    Hi,
    One of our clients has asked us to change the text they receive when they get an email from their contact form.
    It currently says: 'new form submission'
    they want it to say: 'West of the Moon ~ Ayr ~ Website Enquiry'
    We have tried changing the name of the form but this only changes the subject in the email not the wording on the email. Is there any way to do this?

    Hi Richard,
    Please check the php script to which the web form submits to and then open that with a text editor and edit the verbiage that you want to there.
    PS - You will need to make these changes after every export from Muse as Muse will override them on every export/upload.
    - Abhishek Maurya

Maybe you are looking for

  • Convert php script to oracle procedure

    To all please help me... I wanna convert php script to oracle procedure..and the script is (exp).. <?php include("../config/koneksi.php"); $customer=$_POST['customer']; $tanggal1=$_POST['theDate1']; $tanggal2=$_POST['theDate2']; $no_bulan=substr($tan

  • How to read the data in a field that has data type as VARILRAW

    Hello friends I have created a table with one of the field to accept a huge variable lenght field of type 'VARILRAW'. I have written a short Function to accept the data from an external program. Is there a way to see the data that Ihave entered in th

  • Asset transfer with AC305 error

    we are retiring one asset from one company code w/o revenue, the problem is the accounting posting, because it is default to clear revenue sale to affil. company, and it has to be a P&L account, if I use balance sheet account, so my question is how t

  • Error when ESR starts - Cannot activate endpoint for message-driven bean

    Hi, as already posted on ERROR WHEN START ESR: Cannot activate endpoint for message-driven bean after an upgrade to PI 7.1 SP11, we got the following error when trying to start ESR, other applications work well: Application cannot be started! Details

  • Problem with Legal Consolidation for Journal

    Hi BPC Friends I have the application icmatching with data and I have written other values with Journal. I have run the package legal consolidation. I have this problem: for the value that I have loaded into the application, the logic consolidation w