Error sending email

@Teodor ?

Could it be related to this?

Unfortunately no :pensive:

So what SMTP server are you using? How is your mailer set up? Please show some screenshots showing the setup.

ok

Seems your SMTP server is rejecting to send the message for some reason.
You can enable detailed error reporting for the PHPMailer script to see what exactly is causing this:
Please open the following file in your site root:

/dmxConnectLib/PHPMailer/PHPMailer/PHPMailer.php

and edit line 401 from:

public $SMTPDebug = 1;

to

public $SMTPDebug = 3;

save the file and try sending the mail once again. You will see more detailed error in the console - please paste it here.

ok @Teodor hat should i look for here?

    2021-06-07 13:23:36 Connection: opening to mail.alsimob.com.br:587, timeout=300, options=array (  &#039;ssl&#039; =&gt;   array (    &#039;verify_peer&#039; =&gt; false,    &#039;verify_peer_name&#039; =&gt; false,    &#039;allow_self_signed&#039; =&gt; true,  ),)<br>
2021-06-07 13:23:36 Connection: opened<br>
2021-06-07 13:23:36 SERVER -&gt; CLIENT: 220-vps.alsdigital.com.br ESMTP Exim 4.94.2 #2 Mon, 07 Jun 2021 10:23:36 -0300 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.<br>
2021-06-07 13:23:36 CLIENT -&gt; SERVER: EHLO www.imobiliariabellacitta.com.br<br>
2021-06-07 13:23:36 SERVER -&gt; CLIENT: 250-vps.alsdigital.com.br Hello www.imobiliariabellacitta.com.br [162.241.47.59]250-SIZE 52428800250-8BITMIME250-PIPELINING250-PIPE_CONNECT250-AUTH PLAIN LOGIN250-STARTTLS250 HELP<br>
2021-06-07 13:23:36 CLIENT -&gt; SERVER: STARTTLS<br>
2021-06-07 13:23:36 SERVER -&gt; CLIENT: 220 TLS go ahead<br>
2021-06-07 13:23:36 CLIENT -&gt; SERVER: EHLO www.imobiliariabellacitta.com.br<br>
2021-06-07 13:23:36 SERVER -&gt; CLIENT: 250-vps.alsdigital.com.br Hello www.imobiliariabellacitta.com.br [162.241.47.59]250-SIZE 52428800250-8BITMIME250-PIPELINING250-PIPE_CONNECT250-AUTH PLAIN LOGIN250 HELP<br>
2021-06-07 13:23:36 CLIENT -&gt; SERVER: AUTH LOGIN<br>
2021-06-07 13:23:36 SERVER -&gt; CLIENT: 334 VXNlcm5hbWU6<br>
2021-06-07 13:23:36 CLIENT -&gt; SERVER: [credentials hidden]<br>
2021-06-07 13:23:36 SERVER -&gt; CLIENT: 334 UGFzc3dvcmQ6<br>
2021-06-07 13:23:36 CLIENT -&gt; SERVER: [credentials hidden]<br>
2021-06-07 13:23:36 SERVER -&gt; CLIENT: 235 Authentication succeeded<br>
2021-06-07 13:23:36 CLIENT -&gt; SERVER: MAIL FROM:&lt;adriano@imobiliariabellacitta.com.br&gt;<br>
2021-06-07 13:23:36 SERVER -&gt; CLIENT: 250 OK<br>
2021-06-07 13:23:36 CLIENT -&gt; SERVER: RCPT TO:&lt;adriano@alsdigital.com.br&gt;<br>
2021-06-07 13:23:37 SERVER -&gt; CLIENT: 250 Accepted<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: DATA<br>
2021-06-07 13:23:37 SERVER -&gt; CLIENT: 354 Enter message, ending with &quot;.&quot; on a line by itself<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Date: Mon, 7 Jun 2021 10:23:36 -0300<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: To: adriano@alsdigital.com.br<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: From: adriano@imobiliariabellacitta.com.br<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Reply-To: adriano@imobiliariabellacitta.com.br<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Subject: R: Gostei do imovel Ref. TERB9FFA<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Message-ID: &lt;za10OsvuKChofq2Zl1FIHMLKzCW9J47H5S3LNaD68@www.imobiliariabellacitta.com.br&gt;<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: X-Mailer: PHPMailer 6.1.8 (https://github.com/PHPMailer/PHPMailer)<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: MIME-Version: 1.0<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Content-Type: multipart/alternative;<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER:  boundary=&quot;b1_za10OsvuKChofq2Zl1FIHMLKzCW9J47H5S3LNaD68&quot;<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Content-Transfer-Encoding: 8bit<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: This is a multi-part message in MIME format.<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: --b1_za10OsvuKChofq2Zl1FIHMLKzCW9J47H5S3LNaD68<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Content-Type: text/plain; charset=utf-8<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Content-Transfer-Encoding: 8bit<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Voc&ecirc; recebeu uma resposta do siteNeg&oacute;cios imobili&aacute;riosSua mensagem:&nbsp;boa noite<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: a documenta&ccedil;&atilde;o desse lote esta ok? <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: ele vai at&eacute; esse fundo com a arvore ou at&eacute; o arrimo?<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Att<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: AlanResposta:&nbsp;teste de encaminhamentoIm&oacute;vel de interesse:https://www.imobiliariabellacitta.com.br/imovel/terreno-para-venda-jardim-europa-bauru-sp/ref/TERB9FFAAtenciosamente equipe:Neg&oacute;cios imobili&aacute;riosSite:&nbsp;https://www.imobiliariabellacitta.com.brE-mail:&nbsp;adriano@imobiliariabellacitta.com.br<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: --b1_za10OsvuKChofq2Zl1FIHMLKzCW9J47H5S3LNaD68<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Content-Type: text/html; charset=utf-8<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Content-Transfer-Encoding: 8bit<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: &lt;p&gt;Voc&ecirc; recebeu uma resposta do site&lt;br&gt;&lt;b&gt;Neg&oacute;cios imobili&aacute;rios&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Sua mensagem:&amp;nbsp;&lt;/b&gt;&lt;br&gt;boa noite<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: a documenta&ccedil;&atilde;o desse lote esta ok? <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: ele vai at&eacute; esse fundo com a arvore ou at&eacute; o arrimo?<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Att<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: Alan&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Resposta:&amp;nbsp;&lt;/b&gt;&lt;br&gt;teste de encaminhamento&lt;br&gt;&lt;br&gt;Im&oacute;vel de interesse:&lt;br&gt;&lt;a href=&quot;https://www.imobiliariabellacitta.com.br/imovel/terreno-para-venda-jardim-europa-bauru-sp/ref/TERB9FFA&quot;&gt;https://www.imobiliariabellacitta.com.br/imovel/terreno-para-venda-jardim-europa-bauru-sp/ref/TERB9FFA&lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Atenciosamente equipe:&lt;/b&gt;&lt;br&gt;Neg&oacute;cios imobili&aacute;rios&lt;br&gt;&lt;b&gt;Site:&lt;/b&gt;&amp;nbsp;&lt;a href=&quot;https://www.imobiliariabellacitta.com.br&quot;&gt;https://www.imobiliariabellacitta.com.br&lt;/a&gt;&lt;br&gt;&lt;b&gt;E-mail:&lt;/b&gt;&amp;nbsp;adriano@imobiliariabellacitta.com.br&lt;/p&gt;<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: --b1_za10OsvuKChofq2Zl1FIHMLKzCW9J47H5S3LNaD68--<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: <br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: .<br>
2021-06-07 13:23:37 SERVER -&gt; CLIENT: 550-Your FROM address ( adriano@imobiliariabellacitta.com.br ,550-adriano@imobiliariabellacitta.com.br ) must match your authenticated email550 user ( send@alsimob.com.br ). Spoofing not allowed!<br>
2021-06-07 13:23:37 SMTP ERROR: DATA END command failed: 550-Your FROM address ( adriano@imobiliariabellacitta.com.br ,550-adriano@imobiliariabellacitta.com.br ) must match your authenticated email550 user ( send@alsimob.com.br ). Spoofing not allowed!<br>
SMTP Error: data not accepted.<br>
2021-06-07 13:23:37 CLIENT -&gt; SERVER: QUIT<br>
2021-06-07 13:23:37 SERVER -&gt; CLIENT: 221 vps.alsdigital.com.br closing connection<br>
2021-06-07 13:23:37 Connection: closed<br>
{"code":2,"file":"\/home\/alsimobc\/public_html\/dmxConnectLib\/PHPMailer\/PHPMailer\/PHPMailer.php","line":1910,"message":"SMTP Error: data not accepted.","trace":"#0 \/home\/alsimobc\/public_html\/dmxConnectLib\/PHPMailer\/PHPMailer\/PHPMailer.php(1601): PHPMailer\\PHPMailer\\PHPMailer->smtpSend('Date: Mon, 7 Ju...', 'This is a multi...')\n#1 \/home\/alsimobc\/public_html\/dmxConnectLib\/PHPMailer\/PHPMailer\/PHPMailer.php(1437): PHPMailer\\PHPMailer\\PHPMailer->postSend()\n#2 \/home\/alsimobc\/public_html\/dmxConnectLib\/modules\/mail.php(133): PHPMailer\\PHPMailer\\PHPMailer->send()\n#3 \/home\/alsimobc\/public_html\/dmxConnectLib\/lib\/App.php(195): modules\\mail->send(Object(stdClass), '')\n#4 \/home\/alsimobc\/public_html\/dmxConnectLib\/lib\/App.php(127): lib\\App->execSteps(Object(stdClass))\n#5 \/home\/alsimobc\/public_html\/dmxConnectLib\/modules\/core.php(93): lib\\App->exec(Object(stdClass), true)\n#6 \/home\/alsimobc\/public_html\/dmxConnectLib\/lib\/App.php(195): modules\\core->condition(Object(stdClass), '')\n#7 \/home\/alsimobc\/public_html\/dmxConnectLib\/lib\/App.php(159): lib\\App->execSteps(Object(stdClass))\n#8 \/home\/alsimobc\/public_html\/dmxConnectLib\/lib\/App.php(127): lib\\App->execSteps(Array)\n#9 \/home\/alsimobc\/public_html\/dmxConnectLib\/lib\/App.php(116): lib\\App->exec(Object(stdClass), false)\n#10 \/home\/alsimobc\/public_html\/dmxConnectLib\/lib\/App.php(94): lib\\App->exec(Object(stdClass))\n#11 \/home\/alsimobc\/public_html\/dmxConnect\/api\/Painel\/controllers\/mensagens\/enviar_resposta_painel.php(8): lib\\App->define(Object(stdClass))\n#12 {main}"}

Well that’s the error in details:

2021-06-07 13:23:37 SERVER -&gt; CLIENT: 550-Your FROM address ( adriano@imobiliariabellacitta.com.br ,550-adriano@imobiliariabellacitta.com.br ) must match your authenticated email550 user ( send@alsimob.com.br ). Spoofing not allowed!<br>

SMTP Error: data not accepted.<br>

ok thanks

@AdrianoLuiz or @Teodor, how can i get the log file on NodeJS? Tks

Please follow

Thank you @Teodor, but I had already tried this option, in this case I am trying to understand what is going on for sending email using the NodeJS project, because in the development environment everything is ok, but when sending to the server (docker aws), it keeps showing a timeout message! I can’t get a kind of activity log to understand when the problem is occurring! I’ve read several articles here on the forum, regarding the sender email being different from the login email, it’s not the case! but I would like to evaluate where the problem could be, it just informs “timeout”

image

That error usually mean bad conection to SMTP server, or block port.
What provider are you using to send emails?

@Alexander_Paladines, i use the kinghost, but what is stranger, that in developer version the email is sending correctly. This timeout ocorrs in docker server aws (i already have tried open all ports). I Wish the way to see the steps of processing!!! You know how?

How to get this in NodeJs? Tks!!!

Hi @Teodor, how activated this in NodeJS? Tks!

To activate what? Sorry i really don’t understand you. The error says the smtp/connection to it times out, check your server logs for more details.

@Teodor, tks for you reply, but how a get de server logs, following your link “Debugging Sever Connect Erros”, dont show any logs that can i see what error step that ocorrs.

You need to see the docker logs inside server.
To find container_id:

sudo docker ps

Then
sudo docker logs container_id

Now recreate the proccess of send email and see what logs show up.

1 Like

@Teodor and @Alexander_Paladines, when I used the try…catch the “stack” element did not return, only the timeout message, when I removed the try…catch… I could see the “stack error” and I was able to verify that the international login call from my email provider, I should use another smtp, both with SSL (port 465) and without SSL (port 587). It worked!! Thank you very much for your attentions!