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
74
votes
8 answers

Send File Attachment from Form Using phpMailer and PHP

I have a form on example.com/contact-us.php that looks like this (simplified):
adamdehaven
  • 5,772
  • 9
  • 56
  • 84
55
votes
5 answers

How to send an email with a file attachment in Android

I want to attach .vcf file with my mail and send through the mail. But the mail is received on the address without the attachment.I have used the below code but the code for this and i don't know where i am wrong. try { String…
Naresh Sharma
  • 4,283
  • 7
  • 45
  • 68
49
votes
3 answers

Can I send files via email using MailKit?

As the title, is MailKit supported to send file? If yes, how can I do it?
KlynkC
  • 639
  • 1
  • 5
  • 11
46
votes
2 answers

Set Email Attachment name in C#

I add an attachment like this: System.Net.Mail.Attachment attachment = new System.Net.Mail.Attachment(AttachmentPath); msg.Attachments.Add(attachment); But I want to make it attach as a different name, the actual file name is very long and…
Tom Gullen
  • 56,187
  • 79
  • 269
  • 433
46
votes
6 answers

Sending mail attachment using Java

I am trying to send an email using Java and Gmail. I have stored my files on the cloud and the stored files I want to send as an attachment to my email. It should add those files to this mail and not links of those files. How I can send such…
Pravin
  • 1,871
  • 4
  • 20
  • 27
37
votes
3 answers

How to add an image in email body

I want to add an image in email body. I don't want to attach an image to the email, but add an image in the email body. How to do this? I'm using this. "" or "
Niranj Patel
  • 35,286
  • 11
  • 96
  • 128
33
votes
7 answers

Display HTML page inside mail body with Email-ext plugin in Jenkins

I am new to Jenkins and I want to know how it is possible to display the HTML report (not the HTML code) generated after a successful build inside a mail body (not as an attachment). I want to know the exact steps I should follow and what should be…
HobbitOfShire
  • 1,604
  • 4
  • 19
  • 40
30
votes
2 answers

Download attachment from Outlook and Open in Excel

I'm trying to download and then open an Excel spreadsheet attachment in an Outlook email using VBA in Excel. How can I: Download the one and only attachment from the first email (the newest email) in my Outlook inbox Save the attachment in a file…
Paolo Bernasconi
  • 1,890
  • 11
  • 32
  • 54
27
votes
13 answers

Swift_TransportException Connection could not be established with host smtp.gmail.com

I can't figure for the life of me why exactly is it failing.. this is the exact error I am getting: Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.gmail.com [Connection…
Andres
  • 1,953
  • 6
  • 37
  • 67
25
votes
6 answers

Simple PHP form: Attachment to email (code golf)

Imagine a user that would like to put a form on their website that would allow a website visitor to upload a file and a simple message, which will immediately be emailed (ie, the file is not stored on the server, or if it is then only temporarily)…
Adam Davis
  • 87,598
  • 55
  • 254
  • 328
24
votes
4 answers

Android Email Multiple Attachment issue on HTC Thunderbolt

I have a weird situation here. I am trying to send emails with multiple attachments using the following piece of code. Intent emailIntent = new Intent( android.content.Intent.ACTION_SEND_MULTIPLE ); // emailIntent.setType( "plain/text"…
22
votes
5 answers

sendmailR (Part2): Sending files as mail attachments

Following the directions provided in this related question, I was able to send html formated mail messages. Now the question is this: How should I modify the following code, in order to attach one or more files (of any type) to this…
George Dontas
  • 27,579
  • 17
  • 103
  • 140
22
votes
1 answer

HTML-Email with inline attachments and non-inline attachments

What is the correct way to create a HTML-Email with inline attachments and non-inline attachments? In addition please tell me what Content-Type to use with only inline attachments and with only non-inline attachments. Until now i did it like…
steven
  • 4,753
  • 2
  • 22
  • 52
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
  • 30
18
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
  • 853
  • 1
  • 10
  • 23
1
2 3
99 100