email-attachments

Sending an email with an attachment from an application

怎甘沉沦 提交于 2019-12-02 09:09:42
问题 I'm creating an app that has an "export" feature which converts the user's data into a CSV file, and allows the user to send it as an attachment to somebody (presumably themselves). The CSV file is created successfully, but when I try to send the email, I encounter a problem. The device looks like it is going to send the email with the appropriate attachment, but when the email is received... there is no attachment at all... Here is the code I am using to send the email: final Intent email =

Image preview in email Intent not showing when loaded from Assets Folder

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 08:24:21
I have something like the following code: public void shareImageInEmail(String imageUri){ Intent emailIntent = new Intent(Intent.ACTION_SEND); emailIntent.setType("message/rfc822"); emailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); emailIntent.putExtra(Intent.EXTRA_TEXT, "Some text"); emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(imageUri)); mActivity.startActivity(emailIntent); } When the Uri is grabbed from the media folders (camera albums, etc) everything works fine. The problem is when I take a Uri from the assets folder like this: share("content://com.ex.myapp/logo.png"); In that

Sending an email with an attachment from an application

泪湿孤枕 提交于 2019-12-02 07:25:42
I'm creating an app that has an "export" feature which converts the user's data into a CSV file, and allows the user to send it as an attachment to somebody (presumably themselves). The CSV file is created successfully, but when I try to send the email, I encounter a problem. The device looks like it is going to send the email with the appropriate attachment, but when the email is received... there is no attachment at all... Here is the code I am using to send the email: final Intent email = new Intent(android.content.Intent.ACTION_SEND); email.setType("text/html"); email.putExtra(android

PHPMailer User Attachments

北城以北 提交于 2019-12-02 06:25:51
I'm attempting to create a form that sends an email with user populated data. So far everything send correctly however the attachment is never included in the email sent. Any help would be appreciated. HTML form asking user for data. "Mailerindex.html" <html> <head> <link rel ="stylesheet" type = "text/css" href = "style.css" /> </head> <div class="form-style-8"> <body> <form action= "PHPMailer.php" method ="POST" id="from" enctype="multipart/form-data"> <input type="text" name="fname" placeholder="Your Name"/> <input type="number" name="phoneNum" placeholder="Phone Number"/> <input type=

Can't open downloaded attachments from Gmail API

两盒软妹~` 提交于 2019-12-02 04:22:21
问题 I feel like I'm missing something stupid... I'm using the PHP SDK for the new Gmail API to fetch an attachment from an email. I can get the attachment content, but unless it's a text file, I can't open the file after it's been saved. If the attachment is a PDF, it won't render. If it's an excel file, it won't open. What am I doing wrong? // this works; I get the attachment body, etc $data = $g->gmail->users_messages_attachments->get($email_account, $email_message_id, $p->getBody()-

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

Deadly 提交于 2019-12-02 04:10:22
问题 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 = fs.readFileSync('files/demo-invoice-new.pdf', 'utf8'); console.log(data.toString()); var ses_mail = "From: 'AWS SES Attchament Configuration' <" + SOURCE_EMAIL + ">\n"; ses_mail = ses_mail + "To: " + toEmail + "\n"; ses_mail = ses_mail + "Subject: AWS SES Attachment

Can't open downloaded attachments from Gmail API

笑着哭i 提交于 2019-12-02 02:18:12
I feel like I'm missing something stupid... I'm using the PHP SDK for the new Gmail API to fetch an attachment from an email. I can get the attachment content, but unless it's a text file, I can't open the file after it's been saved. If the attachment is a PDF, it won't render. If it's an excel file, it won't open. What am I doing wrong? // this works; I get the attachment body, etc $data = $g->gmail->users_messages_attachments->get($email_account, $email_message_id, $p->getBody()->getAttachmentId()); $fh = fopen(DOC_ROOT."/file.pdf", "w+"); fwrite($fh, base64_decode($data->data)); fclose($fh)

Using Content-ID and cid for embedded email images in Thunderbird

给你一囗甜甜゛ 提交于 2019-12-02 01:55:43
I'm generating emails in a PHP application which attach multiple files to an HTML email. Some of the files are Excel spreadsheets, some of the files are company logos which need to be embedded in the HTML so they load by default using Content-ID and cid identifiers to refer to the attached images. As far as I can see, my syntax is correct, but the images don't ever load inline (they are attached successfully, however). From: email@example.com Reply-To: email@example.com MIME-Version: 1.0 Content-type: multipart/mixed;boundary="d0f4ad49cc20d19bf96d4adf9322d567" Message-Id: <20150421165500

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

你。 提交于 2019-12-02 01:05:14
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 = fs.readFileSync('files/demo-invoice-new.pdf', 'utf8'); console.log(data.toString()); var ses_mail = "From: 'AWS SES Attchament Configuration' <" + SOURCE_EMAIL + ">\n"; ses_mail = ses_mail + "To: " + toEmail + "\n"; ses_mail = ses_mail + "Subject: AWS SES Attachment Example\n"; ses_mail = ses_mail + "MIME-Version: 1.0\n"; ses_mail = ses_mail + "Content-Type: multipart

Python: Open Thunderbird to write new mail with attached file

亡梦爱人 提交于 2019-12-01 21:20:47
I would like to open Thunderbird on Debian AND Windows with an attached file for a new email. So I would like to do the same as in this thread but the posted solution does not work: Python open email client with attachment I have the very same problem as user2686223. The file will not be attached to the mail. Can anyone help me with this? Maybe with another solution? EDIT: This is now how it works: import os os.system("thunderbird -compose to='test@test.de',subject='subject',body='body',attachment='/path/to/file'") Start Thunderbird with the command line argument "-compose". More about it at