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
2599 questions
20
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
  • 8,374
  • 6
  • 55
  • 82
19
votes
3 answers

Sending an email with attachments programmatically on Android

I wish to implement a button that upon pressing it will open the default email client with an attachment file. I am following this, but am getting an error message on the startActivity, saying it is expecting an activity param while I am giving it…
Digital Da
  • 891
  • 1
  • 10
  • 23
18
votes
2 answers

Exceeded storage allocation. The server response was: 4.3.1 Message size exceeds fixed maximum message size

I am using SMTPclient to send mail with attachment. When the attachment is more than 2mb, I am getting the below error: ** "Exceeded storage allocation. The server response was: 4.3.1 Message size exceeds fixed maximum message size".…
Ramesh.kbvr
  • 763
  • 6
  • 15
  • 31
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
  • 988
  • 2
  • 13
  • 29
17
votes
3 answers

Add Attachment base64 image in MailMessage and read it in html body

Currently I have to send emails with MailMessage and SmtpClient but I need to send a picture that is currently in base64 string within the MailAddress body. I have understood that it is necessary to put it in the Attachment, but I don't know how to…
gvivetapl
  • 445
  • 1
  • 5
  • 15
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,577
  • 2
  • 24
  • 39
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
  • 985
  • 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
  • 634
  • 4
  • 13
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
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"…
Olex
  • 1,656
  • 3
  • 20
  • 38
16
votes
2 answers

How to send email with pdf attachment in Python?

Possible Duplicate: How to send Email Attachments with python I would like to edit the following code and send an email with an attachment. Attachment is a pdf file, it is under /home/myuser/sample.pdf, in linux environment. What should I change…
alwbtc
  • 28,057
  • 62
  • 134
  • 188
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
  • 34,477
  • 60
  • 195
  • 309
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,119
  • 4
  • 20
  • 38
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,780
  • 7
  • 27
  • 38
15
votes
9 answers

Codeigniter send email with attach file

I am trying to send email on codeigniter with attach file. I always receive email successfully. However , I never receive with attach file. Below is code and highly appreciate for all comments. $ci = get_instance(); …
mgphyo zaw
  • 181
  • 1
  • 2
  • 5