Questions tagged [email-attachments]

Email attachments are file(s) that are sent along with an email. Use this tag for programming questions related to attaching files to an email message, receiving such files, or processing them (e.g. as part of a mail forwarder or spam filter). Non-programming support questions related to email attachments (e.g. what to click on to add an attachment) are off-topic here, but may be suitable elsewhere on the network.

An email attachment is a computer file sent along with an email message. One or more files can be attached to any email message, and be sent along with it to the recipient. This is typically used as a simple method to share documents and images. A paper clip image is the standard image for an attachment in an email client.

Most mail providers also impose a restriction on the file size of email attachments. For example, Gmail restricts the total email attachment size to 25 MB.

It is also common for some mail providers to block certain emails based on email attachment file types due to security issues.

This tag may relate to:

  • The process of attaching any file with an email
  • The file itself
2293 questions
18
votes
2 answers

How do I use UIActivityItemProvider to send an email with attachment with UIActivityViewController?

I am trying to use UIActivityItemProvider to share a file from within my app via email attachment. I also need to populate the subject line of the email and to specify the name of the attachment to be something different than the name of the file…
RawMean
  • 7,547
  • 3
  • 52
  • 79
17
votes
2 answers

pdf as an email attachment in iOS device

I would like to attach pdf created as an email attachment. I used following tutorial to create pdf on iOS device. The downloaded pdf can be viewed at this path: /Users/”Username”/Library/Application Support/iPhone Simulator/”Your App Directory”. I…
user1140780
  • 978
  • 2
  • 13
  • 29
17
votes
4 answers

Node.js and Nodemailer: Can we attached PDF documents to emails?

I am wanting to attach a PDF document using nodemailer and node.js, however, the only examples I am finding for attachments with nodemailer is with .txt files (here). Does anyone know if PDF document attachment is supported with nodemailer?…
Val
  • 990
  • 4
  • 18
  • 34
17
votes
4 answers

Sending Email with attachment from Asset folder

//EMAIL SENDING CODE FROM ASSET FOLDER email = editTextEmail.getText().toString(); subject = editTextSubject.getText().toString(); message = editTextMessage.getText().toString(); final Intent emailIntent = new…
Ramesh sambu
  • 3,285
  • 1
  • 21
  • 37
17
votes
4 answers

php send e-mail with PDF attachment

I am creating pdf using FPDF . Pdf is generating perfectly and also pdf is available with email. But i want to send body message also. I have tried with body message. Example Fine text message This is text message from shohag But only pdf attachment…
Monirul Islam
  • 975
  • 1
  • 8
  • 23
16
votes
1 answer

make ASP.Net file upload secure

I'm creating an ASP.Net form with a fileupload control which will then email the details of the form and the file to another admin. I want to ensure this secure (for the server and the recipient). The attachment should be a CV so I will restrict it…
wunth
  • 635
  • 4
  • 11
15
votes
2 answers

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

Upon using 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
  • 1,732
  • 2
  • 24
  • 44
15
votes
2 answers

email attachment from the MemoryStream comes empty

_data is a byte[] array of Attachment data. When I'm doing this: var ms = new MemoryStream(_data.Length); ms.Write(_data,0,_data.Length); mailMessage.Attachments.Add(new Attachment(ms, attachment.Name)); Attachment comes empty. Actually…
iLemming
  • 30,282
  • 53
  • 181
  • 302
15
votes
2 answers

Gmail "Can't attach empty file"

My app creates a PDF using iText library (template PDF with forms which are filled) and I want to then attach it to an email to send. When I try to attach the file I get the error Can't attach empty file in the Gmail app. Have also tried with the…
Jonny Wright
  • 1,080
  • 4
  • 19
  • 36
15
votes
5 answers

delete attachment file

i am using System.Net.Mail for sending mail in asp.net.. how to delete attachment file after it is send as attachment mail.. i tried to use File.Delete method.. but i am getting this error.. the process cannot access the file path\fun.jpg' because…
SAK
  • 3,270
  • 7
  • 24
  • 38
15
votes
2 answers

Mandrill email attachments file path

I am trying to add some attachments to an email that is being sent using the mandrill api via a php wrapper. I have tried a number of different things to try to successfully attach the file but to no avail. I am using cakephp 2.x but I don't think…
Manu
  • 559
  • 2
  • 8
  • 20
14
votes
5 answers

Sending an email with attachment using SendGrid

var myMessage = new SendGridMessage(); myMessage.From = new MailAddress("info@email.com"); myMessage.AddTo("Cristian "); myMessage.Subject = user.CompanyName + "has selected you!"; …
crystyxn
  • 819
  • 2
  • 16
  • 39
14
votes
6 answers

Unable to send javascript file as email attachment

Hotmail does not allow javascript files to be attached to emails , what are the reasons behind it ??
user2284926
  • 601
  • 2
  • 8
  • 20
14
votes
2 answers

Android: Send e-mail with attachment automatically in the background

I am making an app that allows the user to take a picture and send it automatically via email to the email he chooses. So far I was able to take a picture and store in the SD card. Now I only need functions that get the picture from the folder…
14
votes
2 answers

Attaching .txt to MFMailComposeViewController

I have a .txt file stored in Documents Folder and I want to send it by MFMailComposeViewController with next code in the body of -sendEmail method: NSData *txtData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"dataBase"…
Alex
  • 1,599
  • 3
  • 19
  • 36