I use JavaMail API to download mails via IMAP. I want to save them locally, in files. I have a DB, but I only want to store some meta-data in it (like mail file location).
Is there a possibility, using the JavaMail API, to get the actual source of an e-mail? Like in Outlook via context menu on a mail in a list and 'View Source'.
Thanks,
Daniel
After some more API reading I've found a solution.
javax.mail.Part#writeTo(OutputStream)
does the thing.
Related
I am doing project using jsp in netbeans8.2, tomcat8, java, MySQL(xampp). I have done the coding till multiple file uploads. Now I want to send email to respective user mail id, once file uploads into MySQL database. I searched but on internet but I got for only one user mail id. I need for all users who will upload one or multiple files then immediately mail notification should be sent. Is there any tutorial or suggest me any tutorial(link) that I can refer to solve my problem??
It depends which framework you are using, there are multiple ways to achieve this.
In case you are using Spring Framework use this tutorial
https://www.baeldung.com/spring-email
https://www.javatpoint.com/spring-java-mail-tutorial
In case Plain Java
https://www.baeldung.com/spring-email
Happy to help further as and when needed.
I would like to send out an email using JavaMail API that contains a shared folder link on Linux.
What would be the format to create this link.
And, when the same e-mail is opened on Windows and the shared folder is accessed, how will the folder download (inter-OS communication)?
There are no shared folder links that work across arbitrary email senders and receivers.
The simple answer is, put the data on a web server and send an http URL.
I want to make an Android Application in Eclipse that accesses the Notes Inbox in Gmail and can edit, create, or delete them. How would I do this? In iOS there is a preinstalled application that does this. Is there an API that I could use to do this in Android?
Hey actually I was looking for the same thing for Node.Js/Javascript and basically found out that you can just access the Gmail account through IMAP and that gives you access to any folder you need. So just use IMAP to access Gmail and then retrieve all the notes from the Notes folder. Just in case, here's the module for Node.Js: https://github.com/mscdex/node-imap
I am creating a web application in which i need to create a form by which user can create an email id on mail server. This is like any email service provider do, like gmail(for creating an email account on their site).
I am new to java mail api. Can anyone provide any hint for this.
Any help will be appreciated.
Thanks...
Actually what i want is a sign up form like what gmail or others provides to create an email id account on their servers.
for developing purpose i m using *hmailserve*r.
manually i can create email ids on this server but i want this in programmatic way.
I don't think JavaMail will help here. First, it depends on the mail server you use. Every mail server has different ways to manage user accounts. For example with Postfix you can manage user accounts in a MySQL database (like in that tutorial). Then you just would have to create database entries. Other mail servers may manage the accounts in a textfile.
AFAIK you can't do it using java mail api alone, you'll need and API for the specific mail server you are using.
Java Mail API will help you out in this. Try these links:
http://www.mkyong.com/java/javamail-api-sending-email-via-gmail-smtp-example/
http://javamail.kenai.com/nonav/javadocs/index.html
I've created a Java program with which I can retrieve mail from an Exchange mailserver. Problem is: the mail is in EML format and I need the MSG format!
Right now I'm retrieving mail through the web access part of Exchange, using the Apache Slide project... is it possible at all to use java to retrieve msg files from an Exchange server?
I've seen examples of C# code, .NET code etc.. isn't it possible somehow to integrate these pieces of code with Java so I can use it to retrieve mail?
Greets,
Cesar
I've done this in Java using Dmitry's RDO library, which is a sub-part of his Outlook Redemption library. See http://www.dimastr.com/redemption/rdo/default.htm. The library builds on top of MAPI. You will need a COM library for this also for which I've used JACOB (Java COM Bridge). See http://sourceforge.net/projects/jacob-project/