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
7
votes
3 answers

How to send multiple attachment in single mail in php

I would like to know about attaching multiple attachment in single mail and send . Please refer my following oode. In this only one file is getting attached. That is second file. First file is not at all considering for attaching. But file is being…
7
votes
1 answer

Get pdf-attachments from Gmail as text

I searched around the web & Stack Overflow but didn't find a solution. What I try to do is the following: I get certain attachments via mail that I would like to have as (Plain) text for further processing. My script looks like this: function…
user1582830
  • 79
  • 1
  • 10
7
votes
3 answers

Gmail Python multiple attachments

I am trying to create a little script that will email multiple attachments using gmail. The code below sends the email but not the attachments. The intended use is to cron a couple db queries and email the results. There will always be 2 files and…
Marc
  • 183
  • 1
  • 1
  • 8
7
votes
3 answers

How to get decode attachment filename with python email?

I use the following code to extract filename of the attachment: import email.utils msg = email.message_from_string(self.request.body) # http://docs.python.org/2/library/email.parser.html for part in msg.walk(): ctype = part.get_content_type() …
LA_
  • 19,823
  • 58
  • 172
  • 308
7
votes
3 answers

Node.js SendGrid how to attach a PDF

I'm using SendGrid to send email in my Node.js application. Every combination I try to attach a pdf ends up with my attached pdf being unreadable. I've tried: fs.readFile('public_html/img/Report.pdf',function(err,data){ var base64data = new…
Ben Muircroft
  • 2,936
  • 8
  • 39
  • 66
7
votes
1 answer

Sending Emails with attachment of less than 10 MB from AWS SES

We are using AWS SES to send Emails from our C# application. We have an attachment(PDF File) of size 9.28MB and when we try to send the Email with the attachment, it throws the following exception: System.Xml.XmlException: Root element is missing.…
Prasad
  • 58,881
  • 64
  • 151
  • 199
7
votes
4 answers

send email with attached files in ZF2

How to send email with text/plain, text/html and attaches in zf2 ? I use this code to send email with smtp: $files = $this->params()->fromFiles(); $smtp = new \Zend\Mail\Transport\Smtp(); $smtp->setAutoDisconnect(true); $optn = new…
Mohammad Mehdi Habibi
  • 1,601
  • 1
  • 14
  • 30
7
votes
1 answer

Modifying the content type of an attachment in a CDO.Message object

When I try to add an MHTML file as an attachment to an email message in VBScript, the ContentMediaType is incorrectly set to "message/rfc822" (RFC 822). From what I understand, this is correct according to Microsoft, but is incorrect according to…
Tyler Crompton
  • 12,284
  • 14
  • 65
  • 94
7
votes
2 answers

How to send a photo to my app from default iOS Camera app?

I know my app can read the photos saved in iOS photo-library; also my app can save a new photo in the default iOS photo-library. But what I am trying to achieve is something like this: the default Photos app should be able to send a photo to my iOS…
Prabu Arumugam
  • 1,929
  • 2
  • 15
  • 19
7
votes
1 answer

Emailing a log4net log as a System.Net.Mail.Attachment throws IOException (process locked)

I wanted to send the current log4net log as an email attachment using System.Net.Mail.Attachment but when I pass in the file path an IOException is thrown. Attachment mailAttachment = new Attachment(logPath); The process cannot access the file…
Ian R. O'Brien
  • 6,682
  • 9
  • 45
  • 73
7
votes
1 answer

Email with multiple attachments

I am working on a PowerShell script for the help desk to use when migrating userhome folders from a server to a NAS device. The help desk user enters the usernames into the "userhomelist.txt" file. My problem is that I'm not able to get the script…
rainhailrob
  • 135
  • 1
  • 1
  • 5
7
votes
1 answer

Why can't I attach my uploaded file to an email?

I have a form with a file input: I submit the form using the ajaxForm method of the JQuery form plugin. Then, in the code to handle the post, I read and process the file. I use cfspreadsheet…
froadie
  • 79,995
  • 75
  • 166
  • 235
7
votes
3 answers

How to embed an image in the HTML body of an email in iOS

I'm trying to include an image in the body of an HTML email sent from an iPad. It seems impossible. I have tried to use the CID approach, but it seems that in iOS it is not possible to get/set the CID of attachments. I've also tried to embed the…
Carlos
  • 1,121
  • 12
  • 26
6
votes
1 answer

No attachments when reading messages (cannot save attachments)

I'm accessing an MS O365 Mail account using python and O365 libraries and can not access/save the file attachments for messages I've done this using normal IMAP etc but now, because we have to user oauth2 and all that - I have to access the mailbox…
Chris Mellor
  • 209
  • 1
  • 6
6
votes
3 answers

AWS-SES sending mail with attachment [application/pdf] Nodejs

I have multiple .pdf attachments and I want to pass the attachments as an array of objects as shown below to the SendEmail function. I read through the AWS documents and there was no information regarding attachments. let attachment_data = []; …
lawrence999
  • 77
  • 1
  • 1
  • 5