email-attachments

Why is this URL not opened from Play! Framework 1.2.4?

不羁岁月 提交于 2019-12-11 02:41:27
问题 I have a URL in my Play! app that routes to either HTML or XLSX depending on the extension that is passed in the URL, with a routes line like :- # Calls GET /calls.{format} Call.index so calls.html renders the page, calls.xlsx downloads an Excel file (using Play Excel module). All works fine from the browser, a cURL request, etc. I now want to be able to create an email and have the Excel attached to it, but I cannot pull the attachment. Here's the basic version of what I tried first :-

Unable to send email with attachments from my app using intents (Gmail)

自闭症网瘾萝莉.ら 提交于 2019-12-11 02:19:26
问题 I'm trying to send files (.log files) contained in a sdcard's folder using Intent. This is the code: public void sendMail() { Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_EMAIL, new String[] {"name.surname@gmail.com"}); intent.putExtra(Intent.EXTRA_SUBJECT, "Log files"); intent.putExtra(Intent.EXTRA_TEXT, "body"); //has to be an ArrayList ArrayList<Uri> uris = new ArrayList<Uri>(); //convert from paths to Android friendly

Decrypt gpg file attached from email (file.pgp)

断了今生、忘了曾经 提交于 2019-12-11 02:16:59
问题 I'm using email.Message class and gnupg library to: 1 - parse email string fetched from Twisted imap4 client. 2 - get the attached file, a .pgp 3 - decrypt it. I can decrypt typical mail content, as: -----BEGIN PGP MESSAGE----- Version: PGP 9 (...) -----END PGP MESSAGE----- but the attachment affair is really making my life a hell. Well, I tried a lot of different ways, but the most logical should be this: message = email.message_from_string(content) if message.is_multipart(): attachment =

How to add image to html body of an email (Go)

白昼怎懂夜的黑 提交于 2019-12-11 02:06:31
问题 I am using Gomail I am attempting to send an email to myself. I have figured out how to do so, but now I want to add an image, either in the html body or as an attachment (does not really matter). I just need to be able to see the image in my email. First off, I am sending the img src through a POST request, which I then save into the following struct ... type test_struct struct { Test string `json:"image"` } I then try to attach it in the email body like so... mail := gomail.NewMessage()

How can I send an Excel file via email?

梦想的初衷 提交于 2019-12-10 23:56:19
问题 I have to create and send an Excel file every month via email to my boss. I want to use a VBA code to send the file as attachment, but my VBA code doesn't work and asks for debug after confirmation. My code: Sub EMail() ActiveWorkbook.SendMail Recipients:="user@gmail.com" End Sub 回答1: Here is an example on how to send Active Workbook as attachment Option Explicit Sub EmailFile() Dim olApp As Object Dim olMail As Object Dim olSubject As String ' // Turn off screen updating Application

Using SendMessage to email a file attachment without saving the file

北城以北 提交于 2019-12-10 23:16:20
问题 I can send an email and everything but I cannot create a valid Attachment() to put into my email. All examples I've found online assumes that it is somehow saved locally on my machine and links it via path but that is not the case. In my method, I create the file using Winnovative, and then I want to attach it to the e-mail and send it. No saving involved. protected void SendEmail_BtnClick(object sender, EventArgs a) { if(IsValidEmail(EmailTextBox.Text)) { try { MailMessage mailMessage = new

Use Microsoft Security Essentials in C# when downloading email attachment

南笙酒味 提交于 2019-12-10 18:42:30
问题 I'm making a simple program to get emails from a pop3 server using VS2010. probably gonna use the open source OpenPOP for some of it. And its supposed to then save the email and attachments in a MS SQL database. But the question is, while attached files are easy to download from the mail server, is there any way to scan the attached files? The small company im working at uses just Microsoft security essentials. Have googled around, but couldn't seem to find any info on this matter. 回答1: You

Trying to send a created text file as an email attachment - from a default folder

孤街醉人 提交于 2019-12-10 15:57:49
问题 I am trying something simple as creating a text file and then send it as attachment. While it works fine if I use the sdcard I don't know where to put it in the "standard data folder" so my app works actually for everyone without sdcard (and the file is somewhat invisible) While this code works, I put the questions in the <- * comment. When creating the file: String FILENAME = "myFile.txt"; String string = "just something"; // create a File object for the parent directory File myDirectory =

How to send batch/mass emails with attachments using mailgun?

梦想与她 提交于 2019-12-10 15:48:27
问题 I want to send batch emails with attachment. I can send the batch emails by attaching the same file to all the emails. But I need to attach different files to different emails by adding file path in recipient variables. I can't see anything related in the official documentation of mailgun. Here is my code : # Instantiate the client. $mgClient = new Mailgun('key-****'); $domain = "foo.bar.com"; # Make the call to the client. $result = $mgClient->sendMessage($domain, array( 'from' => 'gido@foo

How to get decode attachment filename with python email?

懵懂的女人 提交于 2019-12-10 14:49:29
问题 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() if ctype in ['image/jpeg', 'image/png']: image_file = part.get_payload(decode=True) image_file_name = part.get_filename() It works well in many cases, but sometime as image_file_name I get values like =?KOI8-R?B?xsHTLTk2Mi5qcGc=?= or =?UTF-8?B