is there any such thing as SMTP to FTP gateway? - email

PROBLEM: I need a way to automatically convert CSV e-mail attachments into HTML using python, perl, ruby, or something else. I routinely get these and it is too tedious to do these by hand.
QUESTION: Is there a service or trick one can use to forward e-mail so that the attachments show up on a file-server, ready for scripting and conversion out of CSV and into HTML? Has anyone done this using cron, FTP or any other well-known system?

In PHP I wrote many cronjobs to handle attachments based on this script: http://www.linuxscope.net/articles/mailAttachmentsPHP.html.
With it I log into the email account, fetch all attachments and do whatever I need to do. And for CSV, you can use many function, such as fgetcsv().
It's not python, perl, nor ruby (it's something else :)), so the answer to your question is: Yes, it's possible.

Related

How do I export a gSuite user's email when I'm a delegate for their account

I'm trying to find a way to export the emails of a current employee without them knowing. I'm currently a delegate on the account and am using GAM. Any ideas?
If you are superadmin then you should look into either Google Vault which is the immutable record of emails see doc or you should use Got Your Back here written by Jay0lee who wrote GAM. GYB exports to MBOX though so if you want to share the emails with someone who for whatever reason can't read MBOX then you will need an MBOX to PST converter of which there are many online. I have used the one from Systools effectively link. Or you can export by GYB and then import into a different gmail account which is quite useful for some types of investigation.
If you are merely a delegate then there is no easy way.

Best approach to send big files to a server in a automatic way using a rest api?

I need to to send files to a server using rest api. I cannot use a browser as a client and the file should be sent with a http method. It has to be made automatically (using jenkins or so).
All I want to know is what is the best approach. The best way to do this. I have found several info but always using a form in the client side. I cannot use that.
You can do it also without form. What about encoding it in base64?
Look to this solution, by far the best I guess.
The best way to do this is to simply PUT the file to the target URI. If you need to upload larger files, you might want to split it in parts and join them later, when finished.

Where MAPI fields of mails are stored

I was trying to programatically achieve Communication thread tracking for Outlook. I have found this article on MSDN. And I fiddled with it a bit. It seems that it is possible to do it by tracking PR_CONVERSATION_INDEX by developing Outlook Add In.
However I would like to achieve the similar functionality in Java. Since I am quite new to MAPI development, I was not quite clear about where this PR_CONVERSATION_INDEX is stored in .msg file or somewhere in Exchange server that we access using MAPI.
I want to know if it is possible to intercept any incoming / outgoing message and obtain its PR_CONVERSATION_INDEX using Java. If PR_CONVERSATION_INDEX is stored in .msg file then I must be able to parse such file in Java and obtain the same.
If it is not stored in .msg file then I will like to know where it is stored and how can I access using Java.
I don't think Extended MAPI header files were ever translated to Java.
Use C++ (or Delphi).

Programming to Read and Send email

I would like to create a program that does the following:
1. Monitor all emails received at an address that I own, e.g. subscribe#mydomain.com
2. Read the From and Cc fields and insert those email addresses to my database
3. Parse the body of the email to find a certain text, such as a 6-digit registration code (assume I already have the logic to do the parsing)
4. Reply the emails from a template that includes the registration code and some other data retrieved from my database
To make my job easier, I would like to leverage any relevant services out there (maybe SendGrid, apinbox.com, etc.). Ideally all the servers are hosted somewhere in the cloud.
My question: Can you recommend the best way to do the above? You can consider me a total newbie in developing such programs, so please be gentle :-)
I don't know anything about the services you mention but It's fairly easy to write an app to do basic emailing in VB.Net. The built in SmtpClient class makes it easy to send emails, and there's plenty of projects on codeproject.com that shows how to read emails (just search there for POP3). The POP3 protocol isn't very difficult to implement, but it can be a little bit more difficult to handle MIME encoded content, but as I said, the projects at code project should show you that.
However, reading your question more carefully it sounds like you just want to have some automated way of sending out registration codes. If so, it might be worth to check if there isn't already services that'll do that for you. I'd suggest looking into that at some forum for Shareware Developers. One group I've heard of is the Association of Software Professionals, they might have some forum or advice about that.
If you are interested in a hosted service to handle the email parsing and conversion to HTTP POST I would recommend looking at a few like: http://mailhooks.com (free) http://mailnuggets.com (not free, but new and cheap). If you consider yourself a programming newbie, I would consider posting to a simple PHP script to test it out, like this:
<?php
// put the code below in a file at yourwebsite.com/test.php
// and POST your email to it as a test.
$postArr = print_r($_POST,1);
$log = "postLog.txt";
$fh = fopen($log, 'w') or die("can't open file");
fwrite($fh, $postArr);
fclose($fh);
?>
This will log the posted contents to a file called postLog.txt. Some of the mail processing services mentioned above may also have sample code to help out.

Looking for an email/report templating engine with database backend - for end-users

We have a number of customers that we have to send monthly invoices too. Right now, I'm managing a codebase that does SQL queries against our customer database and billing database and places that data into emails - and sends it.
I grow weary of maintaining this every time we want to include a new promotion or change our customer service phone numbers. So, I'm looking for a replacement to move more of this into the hands of those requesting the changes.
In my ideal world, I need :
A WYSIWYG (man, does anyone even say that anymore?) email editor that generates templates based upon the output from a Database Query.
The ability to drag and drop various fields from the database query into the email template.
Display of sample email results with the database query.
Web application, preferably not requiring IIS.
Involve as little code as possible for the end-user, but allow basic functionality (i.e. arrays/for loops)
Either comes with it's own email delivery engine, or writes output in a way that I can easily write a Python script to deliver the email.
Support for generic Database Connectors. (I need MSSQL and MySQL)
F/OSS
So ... can anyone suggest a project like this, or some tools that'd be useful for rolling my own?
(My current alternative idea is using something like ERB or Tenjin, having them write the code, but not having live-preview for the editor would suck...)
I think your looking for a reporting tool which is also capable of sending email. Sending a generared report in html or pdf shouldn't be to hard to do as well.
I've used JasperReports in the past for which I think it should fit your needs.
Another good solution is the pentaho reporting tool
You could easily write something on your own.. give them a basic edit control and allow them to use psuedo variables like {customername} {anothercustomerattribute} within the mail body.
On submit either send directly or save as template.
When the template is sent away the script automatically parses stuff like {customername} into the real customers name from the database.
Your own very very simple custom scriptlanguage :)
Everything else like loops and so on would be maintained on serverside. And if you want particular groups of customers to receive the letter, allow the enduser to select from selectboxes or whatever and do the rest on the serverside with pre-defined rules.