Swift_Mailer auth and send successfull but no email - symfony

I'm working on a Symfony project, and I'm trying to send an email from a custom SMTP (from o2switch) with Swift Mailer.
My parameters.yml is configured with good values, and when I try to send an email I can retrieve this log :
++ Starting Swift_SmtpTransport<br />
<< 220-tournevis.o2switch.net ESMTP Exim 4.87 #1 Mon, 23 May 2016 17:27:32 +0200
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
>> EHLO MY_IP
<< 250-MY_CUSTOM_SMTP Hello MY_IP [MY_IP]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
>> AUTH LOGIN
<< 334 VXNlcm5hbWU6
>> cC5jb2xsaW5hQG15YmV0ZnJpZW5kLmZy
<< 334 UGFzc3dvcmQ6
>> Nk9oVGJIa1ZwSH4t
<< 235 Authentication succeeded
++ Swift_SmtpTransport started<br />
>> MAIL FROM:<MY_EMAIL_FROM#EMAIL.FR>
<< 250 OK
>> RCPT TO:<MY_EMAIL#gmail.com>
<< 250 Accepted
>> DATA
<< 354 Enter message, ending with "." on a line by itself
>>
.
<< 250 OK id=1b4rlU-004H3I-HE
Successfull.++ Stopping Swift_SmtpTransport<br />
>> QUIT
<< 221 MY_CUSTOM_SMTP closing connection
++ Swift_SmtpTransport stopped<br />
So I can red auth login is OK, sending is OK, but I never receive any email..
Any ideas ? My problem is from Symfony ? My custom SMTP ? My server ? Thanks !

You can try with mailtrap.io and discard server problems with the sending.
In past i have some troubles sending from a command because the transport doesn't close never and the server close the socket and i didn't have any error.

Related

Karate fails to close earlier started Crome processes

In my project I use Karate 0.9.5, Oracle JDK8.
From time to time in our pipeline I see a problem. Karate fails to close earlier started Crome processes. Is there any solution to this problem?
I try to solved by explicitly call close() and quit() it didn't help. After running process was finished I found a couple of active chrome process on the server.
Here's a log:
12:51:45.227 preferred port 9222 not available, will use: 52436
12:51:47.524 request:
1 > GET http://localhost:52436/json
1 > Accept-Encoding: gzip,deflate
1 > Connection: Keep-Alive
1 > Host: localhost:52436
1 > User-Agent: Apache-HttpClient/4.5.11 (Java/1.8.0_181)
12:51:47.584 response time in milliseconds: 58,31
1 < 200
1 < Content-Length: 361
1 < Content-Type: application/json; charset=UTF-8
[ {
"description": "",
"devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:52436/devtools/page/4BD6A5C19E01B01D88995CD69367F81F",
"id": "4BD6A5C19E01B01D88995CD69367F81F",
"title": "",
"type": "page",
"url": "about:blank",
"webSocketDebuggerUrl": "ws://localhost:52436/devtools/page/4BD6A5C19E01B01D88995CD69367F81F"
} ]
12:51:47.584 root frame id: 4BD6A5C19E01B01D88995CD69367F81F
12:51:47.632 >> {"method":"Target.activateTarget","params":{"targetId":"4BD6A5C19E01B01D88995CD69367F81F"},"id":1}
12:51:47.638 << {"id":1,"result":{}}
12:51:47.639 >> {"method":"Page.enable","id":2}
12:51:47.883 << {"id":2,"result":{}}
12:51:47.885 >> {"method":"Runtime.enable","id":3}
12:51:47.889 << {"method":"Runtime.executionContextCreated","params":{"context":{"id":1,"origin":"://","name":"","auxData":{"isDefault":true,"type":"default","frameId":"4BD6A5C19E01B01D88995CD69367F81F"}}}}
12:51:47.890 << {"id":3,"result":{}}
12:51:47.890 >> {"method":"Target.setAutoAttach","params":{"autoAttach":true,"waitForDebuggerOnStart":false,"flatten":true},"id":4}
12:51:47.892 << {"id":4,"result":{}}
12:52:02.894 << timed out after milliseconds: 15000 - [id: 4, method: Target.setAutoAttach, params: {autoAttach=true, waitForDebuggerOnStart=false, flatten=true}]
12:52:02.917 driver config / start failed: failed to get reply for: [id: 4, method: Target.setAutoAttach, params: {autoAttach=true, waitForDebuggerOnStart=false, flatten=true}], options: {type=chrome, showDriverLog=true, httpConfig={readTimeout=60000}, headless=true, target=null}
I think the easiest way to solve it is to extend root web driver interface com.intuit.karate.driver.Driver by adding additional method like getPID(). This method must return PID of launched process.
Can you log a bug and also provide some information as to what happened before this, are you using the Docker image etc. It looks like the previous Scenario did not shut down clearly.
But before that do you mind upgrading to 0.9.6.RC3 (just released) and trying that ? There have been a couple of tweaks to the life-cycle especially trying to close Chrome without waiting for a response. Also it may be worth adding a couple of changes a) Target.setAutoAttach without waiting and b) add configure option to not start Chrome if the port is in use

Why is do_GET much faster than do_POST

Python's BaseHTTPRequestHandler has an issue with forms sent through post!
I have seen other people asking the same question (Why GET method is faster than POST?), but the time difference in my case is too much (1 second)
Python server:
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import datetime
def get_ms_since_start(start=False):
global start_ms
cur_time = datetime.datetime.now()
# I made sure to stay within hour boundaries while making requests
ms = cur_time.minute*60000 + cur_time.second*1000 + int(cur_time.microsecond/1000)
if start:
start_ms = ms
return 0
else:
return ms - start_ms
class MyServer(BaseHTTPRequestHandler, object):
def do_GET(self):
print "Start get method at %d ms" % get_ms_since_start(True)
field_data = self.path
self.send_response(200)
self.end_headers()
self.wfile.write(str(field_data))
print "Sent response at %d ms" % get_ms_since_start()
return
def do_POST(self):
print "Start post method at %d ms" % get_ms_since_start(True)
length = int(self.headers.getheader('content-length'))
print "Length to read is %d at %d ms" % (length, get_ms_since_start())
field_data = self.rfile.read(length)
print "Reading rfile completed at %d ms" % get_ms_since_start()
self.send_response(200)
self.end_headers()
self.wfile.write(str(field_data))
print "Sent response at %d ms" % get_ms_since_start()
return
if __name__ == '__main__':
server = HTTPServer(('0.0.0.0', 8082), MyServer)
print 'Starting server, use <Ctrl-C> to stop'
server.serve_forever()
Get request with python server is very fast
time curl -i http://0.0.0.0:8082\?one\=1
prints
HTTP/1.0 200 OK
Server: BaseHTTP/0.3 Python/2.7.6
Date: Sun, 18 Sep 2016 07:13:47 GMT
/?one=1curl http://0.0.0.0:8082\?one\=1 0.00s user 0.00s system 45% cpu 0.012 total
and on the server side:
Start get method at 0 ms
127.0.0.1 - - [18/Sep/2016 00:26:30] "GET /?one=1 HTTP/1.1" 200 -
Sent response at 0 ms
Instantaneous!
Post request when sending form to python server is very slow
time curl http://0.0.0.0:8082 -F one=1
prints
--------------------------2b10061ae9d79733
Content-Disposition: form-data; name="one"
1
--------------------------2b10061ae9d79733--
curl http://0.0.0.0:8082 -F one=1 0.00s user 0.00s system 0% cpu 1.015 total
and on the server side:
Start post method at 0 ms
Length to read is 139 at 0 ms
Reading rfile completed at 1002 ms
127.0.0.1 - - [18/Sep/2016 00:27:16] "POST / HTTP/1.1" 200 -
Sent response at 1002 ms
Specifically, self.rfile.read(length) is taking 1 second for very little form data
Post request when sending data (not form) to python server is very fast
time curl -i http://0.0.0.0:8082 -d one=1
prints
HTTP/1.0 200 OK
Server: BaseHTTP/0.3 Python/2.7.6
Date: Sun, 18 Sep 2016 09:09:25 GMT
one=1curl -i http://0.0.0.0:8082 -d one=1 0.00s user 0.00s system 32% cpu 0.022 total
and on the server side:
Start post method at 0
Length to read is 5 at 0
Reading rfile completed at 0
127.0.0.1 - - [18/Sep/2016 02:10:18] "POST / HTTP/1.1" 200 -
Sent response at 0
node.js server:
var http = require('http');
var qs = require('querystring');
http.createServer(function(req, res) {
if (req.method == 'POST') {
whole = ''
req.on('data', function(chunk) {
whole += chunk.toString()
})
req.on('end', function() {
console.log(whole)
res.writeHead(200, 'OK', {'Content-Type': 'text/html'})
res.end('Data received.')
})
}
}).listen(8082)
Post request when sending form to node.js server is very fast
time curl -i http://0.0.0.0:8082 -F one=1
prints:
HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Content-Type: text/html
Date: Sun, 18 Sep 2016 10:31:38 GMT
Connection: keep-alive
Transfer-Encoding: chunked
Data received.curl -i http://0.0.0.0:8082 -F one=1 0.00s user 0.00s system 42% cpu 0.013 total
I think this is the answer to your problem: libcurl delays for 1 second before uploading data, command-line curl does not
libcurl is sending the Expect 100-Continue header, and waiting 1 second for a response before sending the form data (in the case of the -F command).
In the case of -d, it does not send the 100-Continue header, for whatever reason.

unix sendmail attchment not working

I have below script but it sends email without any attachment. What is wrong?
sendmail /A "/home/dd/data/list.txt" "dd#gmail.com" -t << EOF
To:dd#gmail.com
Subject:List of ids
This is the message
[new line]
Everything else works as expected. Thanks.
The here document is not completed.
sendmail /A "/home/dd/data/list.txt" "dd#gmail.com" -t << -EOF
To:dd#gmail.com
Subject:List of ids
This is the message
EOF
try -EOF so the trailing EOF does not need to be in the leftmost column.
Try this, I just tested it:
/usr/sbin/sendmail -tv me#myplace.com <<%%
Subject: test of sendmail
This is the note
$(uuencode attachment.file newname.txt)
%%
I did not have time to get back to this. email address goes on line 1
Try the script below:
#!/bin/sh
# send/include list.txt file after "here document" (email headers + start of email body)
cat - "/home/dd/data/list.txt" | /usr/sbin/sendmail -i -- "dd#gmail.com" <<END
To: dd#gmail.com
Subject: List of ids
This is the message
END

Error when running Native Client SDK examples

I had followed the instructions in https://developers.google.com/native-client/devguide/tutorial#verify
However, it seems all the examples are not running well. Had tried set NACL_SDK_ROOT to /nacl_sdk/ and /nacl_sdk/pepper_23/ but still no working
e.g., in "Interactive Hello World in C++", when trying to click the button of "Call reverseText()", nothing is seen.
With development tools I see the console output is:
Uncaught TypeError: Cannot call method 'postMessage' of null example.js:25
Here is part of the example.js:
22: function reverseText() {
23: // Grab the text from the text box, pass it into reverseText()
24: var inputBox = document.getElementById('inputBox');
25: common.naclModule.postMessage('reverseText:' + inputBox.value);
26: }
Looks like the reason is "common.naclMode is null". How to fix this error?
--EDIT--
When I was trying another example of "hello world", the output of http server is:
localhost - - [07/Jan/2013 15:52:42] "GET / HTTP/1.1" 200 -
localhost - - [07/Jan/2013 15:52:45] "GET /hello_world/index.html HTTP/1.1" 200 -
localhost - - [07/Jan/2013 15:52:45] "GET /hello_world/index_newlib_Debug.html HTTP/1.1" 200 -
localhost - - [07/Jan/2013 15:52:45] "GET /hello_world/common.js HTTP/1.1" 200 -
localhost - - [07/Jan/2013 15:52:45] "GET /hello_world/newlib/Debug/hello_world.nmf HTTP/1.1" 200 -
localhost - - [07/Jan/2013 15:52:45] "GET /hello_world/newlib/Debug/hello_world_x86_64.nexe HTTP/1.1" 200 -
I see following on the page:
Hello World.
Status: Creating embed: newlib
And the console outputs:
NativeClient: NaCl module load failed: Nexe crashed during startup
Here is ouput of objdump:
nacl_sdk/pepper_23/examples/hello_world$ ../.././toolchain/linux_x86_newlib/bin/x86_64-nacl-objdump -p newlib/Debug/hello_world_x86_64.nexe
newlib/Debug/hello_world_x86_64.nexe: file format elf64-nacl
Program Header:
PHDR off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3
filesz 0x0000000000000120 memsz 0x0000000000000120 flags r--
LOAD off 0x0000000000010000 vaddr 0x0000000000020000 paddr 0x0000000000020000 align 2**16
filesz 0x0000000000021ac0 memsz 0x0000000000021ac0 flags r-x
LOAD off 0x0000000000040000 vaddr 0x0000000010020000 paddr 0x0000000010020000 align 2**16
filesz 0x0000000000010474 memsz 0x0000000000010474 flags r--
LOAD off 0x0000000000060000 vaddr 0x0000000010040000 paddr 0x0000000010040000 align 2**16
filesz 0x00000000000006e8 memsz 0x0000000000001da8 flags rw-
Output of chrome with VERBOSITY=5:
[deqing#hdell]~/works/nacl_sdk/pepper_23$ export NACLVERBOSITY=5
[deqing#hdell]~/works/nacl_sdk/pepper_23$ google-chrome http://localhost:5103
[7,3729430976:11:56:19.763373] NaClRefCountCtor(0x7fb3e5184ac0).
[7,3729430976:11:56:19.763465] NexeFileDidOpen: invoking LoadNaClModule
...
[12,1392863616:03:56:19.825517] nacl_debug(136) : Debugging started.
[12,1392863616:03:56:19.825545] setting stack to : 00007fcefffeffa0
[12,1392863616:03:56:19.825557] copying arg 0 0x7fd95a7b1a40 -> 0x7fcefffeffd0
[12,1392863616:03:56:19.825568] copying env 0 0x7ffff4941bd6 -> 0x7fcefffeffd9
[12,1392863616:03:56:19.825575] copying env 1 0x7ffff4941c95 -> 0x7fcefffeffea
[12,1392863616:03:56:19.825583] system stack ptr : 00007fcefffeff98
[12,1392863616:03:56:19.825589] user stack ptr : 00007fcefffeff98
[12,1392863616:03:56:19.825595] natp = 0x000000000181fa80
[12,1392863616:03:56:19.825603] nap = 0x00007ffff493b9a0
[12,1392863616:03:56:19.825609] usr_stack_ptr = 0x00007fcefffeff98
[12,1392863616:03:56:19.825639] NaClWaitForMainThreadToExit: taking NaClApp lock
[12,1392863616:03:56:19.825648] waiting for exit status
[12,1376372480:03:56:19.825665] NaClThreadLauncher: entered
[12,1376372480:03:56:19.825684] natp = 0x000000000181fa80
[12,1376372480:03:56:19.825691] prog_ctr = 0x00007fce0fc00200
[12,1376372480:03:56:19.825698] stack_ptr = 0x00007fcefffeff98
[12,1376372480:03:56:19.825708] ix 0: 0x00000000
[12,1376372480:03:56:19.825716] found first not-all-ones ix 0
[12,1376372480:03:56:19.825723] Set(0,0x181fa80) #ix 0: 0x00000000
[12,1376372480:03:56:19.825729] After #ix 0: 0x00000001, avail_ix 0
Why the nexe crashed? Can anyone shed some light? Thanks.
the log message
nacl_debug(136) : Debugging started.
indicates you have "Native Client GDB-based debugging" turned on in about:flags. when this happens, gdb is expected to connect to port 4014. are connecting gdb to the debug stub? could you check your about:flags and turn off gdb-based debugging if you didn't really want it?

Qmail : auto response is polluted with email headers

When I set up auto response in qmailadmin for an account. The auto response email is sent but just after the auto response message, there is a sort of stack trace and headers of the original message:
like :
Received: (qmail 903 invoked by uid 508); 12 Jul 2010 20:23:55 -0000
Received: blabla
Received: (qmail 914 invoked from network); 12 Jul 2010 20:31:44 -0000
Received: from blabla (ip)
somemore trace like DKIM-Signature, etc...
*original message headers*
*original message content*
Is there a way to not have all this junk in the body of the email ? My users are not very happy with it... (It used to work well in the past, and I didn't change any thing recently)
If you have an idea of what happens, you are answers are welcome !
thanks !
I assume, that you are using the qmail-autoresponder. To check what is going wrong, I need two additional informations at the moment:
1) Content of the .qmail file with the responder
There should be something like this inside:
|qmail-autoresponder /path/to/autorespond/dir
2) The content of the autorespond directory - especially the message.txt
You can check, if the message.txt is in a correct MIME-format. It should look something like this:
From: "Sender of Mail" <email#yourhost.de>
User-Agent: autoresponder-system
Return-Path: <>
Subject: Re: %S
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Sehr geehrte Damen und Herren,
Diese Emailadresse wird in den kommenden Wochen abgeschaltet. Wir m=F6chten
Sie bitten, sich zuk=FCnftig an Ihren neuen Ansprechpartner ...
Finally I made it works be updating autorespond to the latest version (2.0.2) I don't know what version I had ...
autorespond: usage: time num message dir [ flag arsender ]
optional parameters:
flag - handling of original message:
0 - append nothing
1 - append quoted original message without attachments
Add 0 in .qmail file:
/home/vpopmail/domains/mydomain.com/myuser/Maildir/ | /usr/local/bin/autorespond 86400 3 /home/vpopmail/domains/mydomain.com/myuser/vacation/message /home/vpopmail/domains/mydomain.com/myuser//vacation 0

Resources