Where is the Email stored until it was send (Symfony Mailer) - file

When sending an Email in Symphony Mailer there needs to be a worker consumes it, before it is send. Therefore the files have to be stored in some place, but I cant find out where. I searched in my project, but i couldn't find anything in any directory.
This Information could prove useful for finding and debugging Emails, when you do not receive them and if you want to know if they are still saved.

It depends on the Mailer's spool and path configuration.
See https://symfony.com/doc/4.4/reference/configuration/swiftmailer.html#spool
Also try php bin/console debug:config framework mailer

Related

GMAIL API : How to get the reply without the original message

i'm using google api for gmail. All is working fine, i was able to connect, list and get message / thread, browse every elements of a thread etc...
I want to be able to retrieve a reply without the original message, is it somehow doable ?
I think that every email software will put together a different constructed reply message with the original message included but maybe there's a way to retrieve only the reply.
Thanks for any hint that will allow me to do such thing.
It appears the consensus is that this is not possible, and that the message/thread must be parsed manually with your program.

Importing apache logs into piwik

I am in the process of switching my site analytics from GA to Piwik and would like to incorporate all the historic data that I can. I have already concatenated the full trail of apache log files I have in my possession. However, what I do next is not at all clear to me and the Piwik documentation does not help. It says something along the lines of
python /path/to/piwik/misc/log-analytics/import_logs.py --url=http://analytics.example.com access.log
I have my concatenated log file, all.logs, in the log-analytics folder. I would have thought that I just need to issue
python /path/to/piwik/misc/log-analytics/import_logs.py all.logs
but that throws up an error message. When I provide the URL to the site in question too I get an error saying that it gets back an HTML document (naturally) which it does not like.
I'd be most grateful to anyone who might be able to put me on the right track here.
I think --url=http://analytics.example.com let's you set the URL of Piwik, not your website.

Getting unexpected results when processing email via App Engine app

I'm trying to set up the email receiver found here, to process incoming emails and send them out as POST data to a script on my server to be handled further from there. The issue I'm having is when I send one test email to foo#[myappname].appspotmail.com, the App Engine logs show that the email is continually "received" over and over again every couple of minutes, even though I only sent it once. Then after several minutes of this, when I go into settings and disable the app, I get at least one "Delivery to the following recipient failed permanently" message to the email account I was sending the emails from (makes sense, since the app is now disabled and not accepting any incoming mail).
What I'm having trouble understanding is why the application is behaving like it's getting multiple emails sent to it when it's only one. Do I need to modify the Python script to do something to delete or halt the email once it's been processed the first time? If so, does anyone have any suggestions as to how to do that? The Python script that I'm using is found here.
User voscausa answered my question-- the email requests kept retrying because the script was erroring. Thanks!

PHP Encrypting Files During Downloads and Uploads

This seems like something that should be easy to find, but I've tried every combination of search terms I could think of and all I could find were answers that were "close but no cigar". After spending over a half an hour looking, I finally decided to ask.
What I am trying to do, explicitly worded, is to ensure that the files my users upload to or download from my web pages are encrypted during the transfer. I am not satisfied with just throwing https:// onto the beginnings of the file's links because these files need to be password protected. In order to password protect them, of course, I have set the directory permissions such that the files inside cannot be accessed via URLs at all. I am using a PHP script to manage the uploads and downloads.
I have tried checking the php.net pages on topics like headers() and mcrypt_encrypt() and have come up empty-handed. The page on headers() appears to apply to HTTP only and doesn't tell me how to use an encrypted protocol for a file download (if that's the way one does it) and I can't use mcrypt_encrypt() relying on the assumption that mcrypt_decrypt() can just be run later to make the files usable because obviously mcrypt_decrypt() can't be run client side after a download (nor can mcrypt_encrypt() be run client-side before an upload), so I am left wondering what method I would use to ensure that the user's browsers will be able to encrypt and decrypt these files in a way that requires no action from the user - the same way everything else is encrypted and decrypted.
I'd like to assume that the fact that I am enforcing https on these web page URLs will automatically take care of it the way it takes care of the web page output. However, I do observe that files with separate file paths like images and CSS are not automatically encrypted, and that the code I'm using to trigger those file download boxes contains header information, implying that it's a separate transaction, and perhaps not encrypted.
I have really, really thought about this from a whole bunch of angles and I'm just not seeing the solution. Anyone want to help me?
Use HTTPS for secure (encrypted) delivery of data. Store the files in each user's folder as you're doing, and only allow access after authentication (over HTTPS).
The reason you're having a hard time finding another solution is because HTTPS is the solution.
If you want to store the files encrypted on the disk, you can encrypt them with a symmetric block (stream) cipher as they're uploaded and do the reverse as they're downloaded. You could use a secret key that's unique per user as the symmetric key.

How to read e-mails in a local directory using Java?

I would like to create a java program that would get only the body/message of the mail, the mails are in .eml format and the mails are placed locally in my machine. The problem is when I try to look for ways to do this I'm still lead to use the Folder class which requires an active mail server. Now, my question is, is there any way I can extract the message part of an e-mail using the Javamail API without the need to connect to a server? Because doing the extraction of the message part of an e-mail without including its headers is nearly impossible with filestream.
Thanks for the help.
Cheers!
You can use a "local store provider" for JavaMail, but perhaps the simplest approach for you is to just use the MimeMessage that takes an InputStream. Give it a (buffered) FileInputStream and it will parse the message for you.

Resources