Questions tagged [attachment]

Any additional content added to a digital object, such as an email attachment.

Many languages provide facilities for sending email or transmitting other data (e.g. SOAP) but may not always provide a clear interface for attaching documents or other arbitrary binary data to the message or object.

This tag is for all questions relating to adding attachments to transmitted data or providing an interface for doing so.

2942 questions
20
votes
5 answers

android exporting to csv and sending as email attachment

I have seen multiple threads in this site discussing about sending email with attachments in android. I tried every methods discussed here, here and here. I am creating a csv file via code and saving this file to android internal storage. Then I…
Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167
20
votes
1 answer

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

I'm new to Elasticsearch and I read here https://www.elastic.co/guide/en/elasticsearch/plugins/master/mapper-attachments.html that the mapper-attachments plugin is deprecated in elasticsearch 5.0.0. I now try to index a pdf file with the new…
7twenty7
  • 558
  • 1
  • 3
  • 16
19
votes
3 answers

Can anyone tell my why I'm getting the error [AttributeError: 'list' object has no attribute 'encode']

I keep trying to run this code in order to send an excel sheet as an attachment on an email. I can send normal emails using smtplib but can't get the MIMEMultipart to work. I keep getting the [AttributeError: 'list' object has no attribute 'encode']…
Mark
  • 1,051
  • 3
  • 13
  • 17
19
votes
8 answers

sp_send_dbmail executed from job fails with query result attached as file

I have faced with the following issue: when trying to send email with results of query attached as file, using sp_send_dbmail via executing ordinary query everything seems to be working OK. But if add the same code into JobStep and run the job, it…
Paul Kyrejto
  • 1,285
  • 3
  • 12
  • 19
18
votes
5 answers

Email PDF Attachment with PHP Using FPDF

I want to email a PDF as an attachment that was created using FPDF. My code looks like this, but the attachment never comes through.
HWD
  • 1,547
  • 7
  • 36
  • 72
18
votes
5 answers

How to fix background image inside div

I've discovered a rather odd problem, which I think I know how to explain; i just don't know how to fix it! I have a page with a div#container (a div with 100% min-height (height for IE)) containing a header, a "page-content" and a footer. The…
Latze
  • 1,843
  • 7
  • 22
  • 29
18
votes
2 answers

Stream as an Attachment to System.Net.Mail is 0 bytes

I've got a project where I'm using a PDF generator to send a file to a user. We'd like to give the user the option to attach this file to an email instead, and we're having trouble using the Stream object and Attachment logic together. We start…
dnord
  • 1,702
  • 2
  • 18
  • 34
16
votes
1 answer

How to preview code attachments in Outlook?

I frequently sent or receive mail with source code attachments (.c, .cpp, .h, .js, etc). It would be easier if I could preview these files in Outlook, so I do not need to open in another application. Preferably, the preview would include syntax…
Jury
  • 1,227
  • 3
  • 17
  • 30
16
votes
2 answers

Codeigniter: Email attachment of last emails not cleared while sending multiple emails in loop

My code sends multiple emails in loop with attachment, Problem is attachments of last(previous all) emails get attached to next email. ex. suppose 3 emails in database with 1 attachment in each(a1.pdf, a2.pdf, a3.pdf) then, it sends email with…
anils
  • 1,782
  • 6
  • 19
  • 29
16
votes
4 answers

PHP mail() attachment problems

Can someone help me figure out why this keeps returning false? $to = "myemail@mydomain.com"; $from = "Website "; $subject = "Test Attachment Email"; $separator = md5(time()); // carriage return type (we use a PHP end of line…
HWD
  • 1,547
  • 7
  • 36
  • 72
16
votes
6 answers

File locked after sending it as attachment

I am sending a file as an attachment: // Create the file attachment for this e-mail message. Attachment data = new Attachment(filePath, MediaTypeNames.Application.Octet); // Add time stamp information for the…
JMon
  • 3,387
  • 16
  • 63
  • 102
16
votes
2 answers

Attachment missing from message sent with Gmail API but only for recipient

When calling the Gmail API in JavaScript to send a message with an HTML body and a ~100KB PDF attachment, the attachment correctly appears attached to the message in the sender's Gmail Sent folder, but does not appear on the message for the…
Employee
  • 2,231
  • 3
  • 33
  • 60
16
votes
3 answers

Android: How do I attach a temporary, generated image to an email?

I have a programmatically generated image that I want to send as an attachment via the ACTION_SEND and EXTRA_STREAM method. But how do i do this? My first attempt (writing to my context.getCacheDir() based file path) appeared to work in the Gmail…
el2iot2
  • 6,428
  • 7
  • 38
  • 51
16
votes
2 answers

Which HTTP method to use for file downloading?

In my site users can download their files. But files are generated by using PHP. So what's HTTP method should I use for sending request for download as file attachment? GET or POST?
Erik
  • 14,060
  • 49
  • 132
  • 218
16
votes
2 answers

How to send a csv attachment with lines longer than 990 characters?

Alright. I thought this problem had something to do with my rails app, but it seems to have to do with the deeper workings of email attachments. I have to send out a csv file from my rails app to a warehouse that fulfills orders places in my store.…
CharlieMezak
  • 5,999
  • 1
  • 38
  • 54