Compose an outlook E-mail through Java - jakarta-mail

I want to compose an outlook E-mail through java on my local machine. Can someone please suggest which library to use and few related sample example's would be great.
Want I am really trying to do is this.
compose an outlook email by connecting to outlook with my username and password through java.
attach a file and create a HTML message.
send it to the recipients
Please help me taking first steps to create this program.

I assume what you really want to do is connect to the Exchange mail server and send the message without using the Outlook client application. As long as your Exchange server has SMTP support enabled, you should be able to do that using JavaMail. There's documentation, sample programs, and a FAQ. Start at the JavaMail project page.

Related

Need directions for adding XOAuth2 to a program using Javamail Office 365 IMAP, especially how to get the tokens

I've searched and read through the questions regarding XOAuth2 and Javamail but am very confused as to how to get the tokens, and etc. The application I have is a Linux service that retrieves emails and forwards them to other email addresses based upon the contents of the email. It's been working fine with plain authentication but now seems that MS is forcing to use OAuth2.
I've tried to follow the topics on this and always end up with A1 NO AUTHENTICATE failed but I haven't found any of the topics showing success.
It's obvious I'm missing something between my ears as to how to acquire and use the tokens, etc. A lot of the confusion is trying to relate the MS guide to the Javamail environment.
Does the application have to be Registered with MS? I see many reference to Azure, but my app is on Linux instance on AWS. Is the only way to get tokens via graph.microsoft.com? Seems that somehow the obtaining of the tokens needs to be embedded in my application but I haven't found how? By the way I'm using javamail 1.6.2.

Get attached files with InboxSDK and send them via Gmail API

I am using InboxSDK and gmail API on PHP to build a chrome extension.
Everything is flowing quite okay so far, but I am facing a big obstacle.
What is my purpose?:
Via InboxSDK, I want to handle when a user attaches files.
Send all the information to my server.
Attach the files and send the mail via Gmail API from the server.
Where am I?:
I already authorize the user with OAuth2.0 and keep the tokens and also I am already able to send the e-mails written in Gmail Web via server Gmail API.
I do not know how to move on with handling the files.
How may I proceed?
Also, if there is any alternative way to achieve this without InboxSDK I am happy to hear.
Thank you.
It is not possible as mentioned.
But there is a workaround.
Create a draft via InboxSDK.
Fetch the draft via gmail API.
Send the created draft, which already contains the attached files.

uploading file from Access 2010

I have a Access 2010 frontend database + MySQL as backend. So far it is working fine. I would like to upload document and decided to save on the server rather than on the Database. My first question is, how do I upload file from access frontend to the remote server/location?
I was thinking, maybe store the data on the database and use some kind of triggers or script which reads the blob file from database and saves on the server as well as fills the file path into another column.
is there any easier way to upload files from access frontend to a remote server? I am using MySQL server as backend.
thank you in advance
SFTP with Putty
This might help you - it's a great example using Putty on the Windows machine to communicate over SFTP with the Linux server using VBA: SFTP upload with VBA
You would need to install putty on each Windows machine that uses Access and ensure that the appropriate rights are in place on the Linux server.
Custom Add-In
You could use .NET to create an add-in for access to transfer the file to the server over sockets, but this would require you to write a server-side application to listen for requests. You would have complete freedom over how you implement it at the cost of added complexity for yourself as the developer.
You would need to:
Create an add-in using Visual Studio (or other .NET IDE)
Add this into your Access application and use the API you've built.
Create a server-side application to listen to it (this could be a simple Python application)
SMTP Approach
If you want to be creative you could email the file to your own mock SMTP server using Access' CDO functionality: Sending emails with Access
Again, you would have to create a handler application to handle the SMTP protocol, but I'm sure there are some great examples out there.
HTTP Approach
You could even encode the file and send it over HTTP to a simple PHP server in a simple POST request: Example web request with Access You would need to encode the file to base64 or something or file a way of handling file uploads.
Conclusion
As you can see, the easiest approach by far is using Putty, but there are some interesting custom approaches you could take.
I'd say using either SMTP or HTTP would be suitable but that depends how easily you could set up the server-side handler. There may be existing SMTP emulators out there that you could use to handle receiving and managing files.
this might help someone.
I have used Chilkat FTP activeX component and its working fine. Chilkat provides prewritten code just copied from his website and everything is fine. Although I could not find how to show the transferring progress.
regards
krish

Silverlight Identifying Info

I am currently working on a Silverlight application that talks to a server application. I am trying to come up with any info that I can use to identify the client when it connects. I obviously have the IP on the server side but that is about it. I was planning on having the client send a message with its ID info as part of the connection process. The issue I am having is that Silverlight without elevated privileges doesn't have access to anything useful to identify the client. I tried computer name, username, etc, but they are all things Silverlight doesn't have access to without elevated privileges or an external service. Is there anything I am missing? Is there anything I can get to that would help identify the client?
You could try generating a "fingerprint" based on plugins, screen size, etc. Here is a j-query plugin that claims to do just that:
https://github.com/carlo/jquery-browser-fingerprint

Opening Additional Mailboxes using Java Mail API

Additional mailboxes can be configured to a user using MS Outlook Client. I presume a shared mail group can also be added this way.
http://www.vlerick.com/helpdesk/our_services/faq/software_solution/microsoft/outlook/faq_additional_mailbox.html
I am trying to develop a java program to read emails using java mail api. I am currently trying to connect and read using POP3 protocol. Is there any way to read mails from other shared mail boxes configured for a user using java mail api?
Regards,
Vivek

Resources