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
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
  • 569
  • 2
  • 8
  • 21
14
votes
5 answers

Python Sendgrid send email with PDF attachment file

I'm trying to attach a PDF file to my email sent with sendgrid. Here is my code : sg = sendgrid.SendGridAPIClient(apikey=os.environ.get('SENDGRID_API_KEY')) from_email = Email("from@example.com") subject = "subject" to_email =…
John
  • 4,711
  • 9
  • 51
  • 101
14
votes
5 answers

Email opened/not tracking from nodejs nodemailer

What I know I want to implement the email opened/not tracking in one of my websites. after searching i found that email-opened/not tracking is done by sending an embedded image along with email(typically 1 px transparent). when some one opens the…
raj
  • 694
  • 1
  • 5
  • 22
14
votes
10 answers

How to attach two or multiple files and send mail in PHP

The code below sends only one attachment, but I need to attach and send two file(one rar file and pdf) $email_to = "$email"; // The email you are sending to (example) $email_from = "online@example.co.in"; // The email you are sending from…
user3309116
  • 209
  • 2
  • 3
  • 7
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
4 answers

How to attach PDF to email using PHP mail function

I am sending an email using PHP mail function, but I would like to add a specified PDF file as a file attachment to the email. How would I do that? Here is my current code: $to = "me@myemail.com"; $subject = "My message subject"; $message =…
MultiDev
  • 10,389
  • 24
  • 81
  • 148
13
votes
1 answer

mail: Invalid header when sending mail attachment with Ubuntu

This exact question was posted by user 'anvd' on 29th July but then removed - I found it on Google Cached version...! I'm guessing the fix was something obvious, but would be great if it wasn't removed. I am trying this command to send an email…
user246977
  • 131
  • 1
  • 1
  • 4
13
votes
1 answer

Send attached file with Mailgun using python

I'm trying to send an email with an attached file with the Mailgun API using requests.post. In their documentation they alert that you must use multipart/form-data encoding when sending attachments, I'm trying this: import requests MAILGUN_URL =…
13
votes
2 answers

Sending email attachments via UWP EmailManager not working

Sending an attachment from a universal app with the following code is not working, why? Dim emailMessage As New EmailMessage() emailMessage.[To].Add(New EmailRecipient("a@b.com")) emailMessage.Subject = "Test" …
tcctest
  • 145
  • 1
  • 5
13
votes
10 answers

How can I send an Android app that I'm developing to someone over e-mail?

This is my first Android app. I need to email what I have so far to someone for testing. How should I do I export the app and attach it, so it is not being treated as Junk?
Emanuil Rusev
  • 34,563
  • 55
  • 137
  • 201
13
votes
3 answers

PHPMailer AddStringAttachment with PDF

I am new to phpmailer and I am able to send emails, emails with attachments, and stringattachments that are .txt files however I cannot send stringattachments with PDF's. The email is sent, but the PDF is corrupted/unable to open. Can anyone help to…
user2233333
  • 183
  • 1
  • 1
  • 6
13
votes
1 answer

Best way to include images in HTML email?

I'm creating some HTML emails with images included. For each email the size of the images + email is less than 150kb. I'm trying to make them work well for the main clients mentioned here…
Jon Cox
  • 10,622
  • 22
  • 78
  • 123
12
votes
4 answers

How to Email a Django FileField as an Attachment?

I need to send a models.FileField as an email attachment using Django. I've seen snippets that show how to do this with the raw request.FILES data (which still contains the Content-Type), but have not been able to find anything that shows how to do…
Lyle Pratt
  • 5,636
  • 4
  • 27
  • 28
12
votes
2 answers

How can send PDF attachment in `Node aws-sdk` sendRawEmail function?

I want to send PDF file in attachment using sendRawEmail(Node: aws-sdk) function, I have tried lots of ways, email sends successfully but PDF goes plain. Please correct my code and help to solve it. Code is here: try { data =…
12
votes
1 answer

Send email via SMTP with attachment, plain/text, and text/hml

My goal: Send transactional emails via SMTP with plain/text, text/html, and attachments. My code: Implemented with JavaMail My issue: It looks fine on hotmail, or outlook. But on gmail, it does not show the message body properly if it is an email…
Rafa
  • 1,997
  • 3
  • 21
  • 33