How to index a pdf file in Elasticsearch 5.0.0 with ingest-attachment plugin?

You need to make sure you have created your ingest pipeline with: PUT _ingest/pipeline/attachment { “description” : “Extract attachment information”, “processors” : [ { “attachment” : { “field” : “data”, “indexed_chars” : -1 } } ] } Then you can make a PUT not POST to your index using the pipeline you’ve created. PUT my_index/my_type/my_id?pipeline=attachment … Read more

Android: Intent.ACTION_SEND with EXTRA_STREAM doesn’t attach any image when choosing Gmail app on htc Hero

For me the problem was solved with the following lines of code: Bitmap screenshot = Bitmap.createBitmap(_rootView.getWidth(), _rootView.getHeight(), Bitmap.Config.RGB_565); _rootView.draw(new Canvas(screenshot)); String path = Images.Media.insertImage(getContentResolver(), screenshot, “title”, null); Uri screenshotUri = Uri.parse(path); final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); emailIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri); emailIntent.setType(“image/png”); startActivity(Intent.createChooser(emailIntent, “Send email using”)); The key thing is that I’m saving the screen-shot to … Read more

send email with attachment using php

for what reason no use phpmailer? example for an attachment: function mandaMail ($nombredest, $maildest, $asunto, $cuerpo) { require_once(“mailer/class.phpmailer.php”); $mail = new PHPMailer(true); $mail->IsSMTP(); try { $mail->Host = “xxxx”; $mail->Port = 25; // smtp server $mail->SMTPAuth = true; $mail->Username = “xxxx”; // smtp username $mail->Password = “xxxx”; // smtp pass $mail->AddReplyTo(“xxxx”, “xxxx”); // email & name … Read more

How to add an attachment to an email using VBA in Excel

Try this: Sub emailtest() Dim objOutlook As Object Dim objMail As Object Dim rngTo As Range Dim rngSubject As Range Dim rngBody As Range Set objOutlook = CreateObject(“Outlook.Application”) Set objMail = objOutlook.CreateItem(0) With ActiveSheet Set rngTo = .Range(“E2”) Set rngSubject = .Range(“E3”) Set rngBody = .Range(“E4”) End With With objMail .To = rngTo.Value .Subject = … Read more

Download attachments using Java Mail

Without exception handling, but here goes: List<File> attachments = new ArrayList<File>(); for (Message message : temp) { Multipart multipart = (Multipart) message.getContent(); for (int i = 0; i < multipart.getCount(); i++) { BodyPart bodyPart = multipart.getBodyPart(i); if(!Part.ATTACHMENT.equalsIgnoreCase(bodyPart.getDisposition()) && StringUtils.isBlank(bodyPart.getFileName())) { continue; // dealing with attachments only } InputStream is = bodyPart.getInputStream(); // — EDIT — … Read more

Storing an image into an Attachment field in an Access database

As you have discovered, you cannot use a SQL statement to insert files into an Attachment field in an Access database. You have to use the LoadFromFile() method of an ACE DAO Field2 object. The following C# code works for me. It is adapted from the Office Blog entry here. using System; using System.Collections.Generic; using … Read more

Intent filter to download attachment from gmail apps on Android

I was able to make the download and preview buttons pop up on Android in GMail by removing the scheme data filter in my intent (delete the scheme line and give it a try): <intent-filter> <action android:name=”android.intent.action.VIEW” /> <category android:name=”android.intent.category.DEFAULT” /> <category android:name=”android.intent.category.BROWSABLE” /> <data android:scheme=”file” /> <data android:mimeType=”*/*” /> <data android:pathPattern=”.*\\.ext” /> <data android:host=”*” … Read more