Jodd Message parsing failed - jodd

I'm using Jodd version 3.7 and I would like to read an outlook account (outlook.it).
Outlook SMTP is :
server: smtp-mail.outlook.com
port: 587 with TLS
and IMAP is :
server: imap-mail.outlook.com
port: 993 with SSL
Sending email is fine, but when I try to receive email with IMAP with method receiveAndDelete I get the following error:
jodd.mail.MailException: Message parsing failed; <--- javax.mail.MessageRemovedException
the email message is really deleted, but I dont want to get that exception.
How can i avoid this?

It's a bug! Let me explain: Jodd copies data from received message to its own structure, however, this is done after the deletion flag is set. Therefore, mail library detects it is a deleted message and throws an exception.
Fixed here, by parsing the message before setting the flags.
Workaround: don't use receiveAndDelete - instead receive and then delete later.

Related

Forgot password system using Gmail & Laravel 8

I am using built in Laravel 8 login system with its scaffolding have a project that has a forgot password for its login system which sends emails from requests. I'm trying to use Gmail and XAMPP for sending the email. I am unable to send an email using the Gmail account, So I tried configuring my .env and other configuration files in XAMPP. But I get the following error upon sending the request
Swift_TransportException
Connection could not be established with host smtp.googlemail.com :stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
Could someone tell me why I'm getting this error and what should I do to get rid of this? Thanks a lot.
<**env**>
MAIL_MAILER=smtp
MAIL_HOST=smtp.googlemail.com
MAIL_PORT=587
MAIL_USERNAME=********#gmail.com
MAIL_PASSWORD=*********
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=********#gmail.com
MAIL_FROM_NAME="${APP_NAME}"
<** php.ini**>
inside xampp\php\php.ini under the function under the tab [mail function]
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = ******#gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
<**sendmail.ini**>
inside xampp\mail\sendmail.ini under the function [sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=*******#gmail.com
auth_password=******
force_sender=*******#gmail.com

Using outbound Node-RED email to local SMTP server

I have a local SMTP email server I use for testing purposes running on my machine. It listens for SMTP on port 25. I am able to send and receive emails to it using a regular email client.
When I build a Node-RED flow that contains an e-mail output node and configure its properties with:
to: <email address>
server: localhost
port: 25
and submit a flow, I get the error:
25 Feb 16:43:24 - [error] [e-mail:<email address>] Error: 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:794:
I am at a loss on how to proceed. Looking at the messages, it almost appears that there is some form of SSL negotiation/test at play here. Switching on trace on my SMTP server, I find the following logs each time I try and run a flow:
"TCPIP" 10708 "2016-02-25 16:43:08.294" "TCP - 127.0.0.1 connected to 127.0.0.1:25."
"DEBUG" 10708 "2016-02-25 16:43:08.298" "Creating session 22"
"SMTPD" 10708 22 "2016-02-25 16:43:08.298" "127.0.0.1" "SENT: 220 WIN7-X64 ESMTP"
"DEBUG" 9772 "2016-02-25 16:43:08.299" "Ending session 22"
It appears that the Node-RED node is sending a connection request, getting back the SMTP 220 response and then failing immediately after that.
I came across the same problem and have a nasty hack that will enable mail to go via my local exchange server's plain SMTP, with no auth.
Edit the .../61-email.js file and change it thusly:
var smtpTransport = nodemailer.createTransport({
host: node.outserver,
port: node.outport,
secure: false,
ignoreTLS: true //,
// auth: {
// user: node.userid,
// pass: node.password
// }
});
I see Dave has replied to the github issue but just to close the loop on this question.
At this time (Feb 2016) the node assumes SSL is always available and enabled, at some point we need to go back to the email node and find a simple way to expose a lot more of the nodemailer options to allow connections to a wider range of email providers both public and private.

502 (BAD GATEWAY) and 504 (GATEWAY TIMEOUT) in Wirecloud

Time ago we set up a PEP proxy to secure the API our widgets are using. All have being working correctly until today, that we are receiving a 502 Bad Gateway error code for every call going through the proxy.
We have checked the requests are reaching our server and it is responsing correctly to them. The parameters added by the proxy (x-nick-name, x-display-name...) are defined correctly too.
We have also checked the requests outside wirecloud and all go well: we get the token properly and use it in the subsequent calls without problem.
We do not know where this error comes from, any ideas?
EDIT 06/11/2015
After Alvaro's new setting we are receiving the following error in the response body:
{
"description": "Connection Error",
"details": "('Connection aborted.', error(104, 'Connection reset by peer'))"
}
EDIT 09/11/15
Today, the code received in the request's response is different: 504 GATEWAY TIMEOUT
{
"description": "Connection Error",
"details": "('Connection aborted.', error(104, 'Connection reset by peer'))"
}
EDIT 16/11/15
Answering to Mr. Alonso's question:
1.- If we request directly to the server, the response is correctly displayed in the application.
2.- Here you can see the logs from the PEP Proxy with the new line added. As you can see the request is redirected correctly but the info is not displayed in the app.
Seems that the problem is in the PEP proxy side.
I've checked using other tools like curl (I obtained the connection details from the server log). Making the same request using curl gives the same result than using WireCloud: connection reset by peer. Also, if I make the request without the X-Auth-Token header, your service responds with an 401 error code. This is important, because it means that there is not a communication problem between the Mashup portal and your server. I don't know why, but the PEP proxy seems to be crashing when making the authenticated request from the Mashup portal (the same command works executing it from my machine).
I suggest you to restart the PEP proxy. If the problem persist, please attach any available info about the crash from the PEP proxy logs.
You can check three things to give us more information:
Try to remove the PEP and send the request directly to your service.
Introduce a new log in PEP to print the headers of the response: line 41 of lib/HTTPClient.js, log.debug("Headers: ", headers);
Try to send a request to the root path (directly to the tomacat or apache)
If not perhaps we can talk in private to check more information

Error While sending a mail from Email subscription in SSRS

I am getting below error while sending a mail from Email subscription in SSRS.
Below is the Configuration section:
<RSEmailDPConfiguration>
<SMTPServer>mysmtpserver addres</SMTPServer>
<SMTPServerPort>
</SMTPServerPort>
<SMTPAccountName>
</SMTPAccountName>
<SMTPConnectionTimeout>
</SMTPConnectionTimeout>
<SMTPServerPickupDirectory>
</SMTPServerPickupDirectory>
<SMTPUseSSL>
</SMTPUseSSL>
<SendUsing>2</SendUsing>
<SMTPAuthenticate>2
</SMTPAuthenticate>
<From>myid#domain.com</From>
<EmbeddedRenderFormats>
<RenderingExtension>MHTML</RenderingExtension>
</EmbeddedRenderFormats>
<PrivilegedUserRenderFormats>
</PrivilegedUserRenderFormats>
<ExcludedRenderFormats>
<RenderingExtension>HTMLOWC</RenderingExtension>
<RenderingExtension>NULL</RenderingExtension>
<RenderingExtension>RGDI</RenderingExtension>
</ExcludedRenderFormats>
<SendEmailToUserAlias>True</SendEmailToUserAlias>
<DefaultHostName>
</DefaultHostName>
<PermittedHosts>
</PermittedHosts>
</RSEmailDPConfiguration>
Error:
notification!WindowsService_0!1858!08/20/2013-05:48:02:: i INFO: Handling subscription f78a80f1-dd72-4215-b86a-96fa7391cfc0 to report ReportMenu, owner: mydomain\myid, delivery extension: Report Server Email.
library!WindowsService_0!1858!08/20/2013-05:48:02:: i INFO: RenderForNewSession('/ReportProject/ReportMenu')
library!WindowsService_0!1858!08/20/2013-05:48:04:: i INFO: Initializing EnableExecutionLogging to 'True' as specified in Server system properties.
emailextension!WindowsService_0!1858!08/20/2013-05:48:04:: e ERROR: Error sending email. Exception: System.Net.Mail.SmtpException: Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender
at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)
at System.Net.Mail.SmtpConnection.OnClose(Object sender, EventArgs args)
at System.Net.ClosableStream.Close()
at System.Net.Mail.MailWriter.Close()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
notification!WindowsService_0!1858!08/20/2013-05:48:04:: i INFO: Notification f06badda-98db-4aba-8a1f-26646430479b completed. Success: True, Status: Failure sending mail: Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender, DeliveryExtension: Report Server Email, Report: ReportMenu, Attempt 0
Could someone help on this ?
As per the exception, the issue is coming from the SMTP server:
Status: Failure sending mail: Mailbox unavailable. The server response
was: 5.7.1 Client does not have permissions to send as this sender
Because you have SMTPAuthenticate set to 2 in the config, the SSRS service user will try and authenticate to the SMTP server. See Configure a Report Server for E-Mail Delivery for more details.
You need to resolve this issue - since SSRS is running under NT Service\ReportServer and trying to send the mail as <From>myid#domain.com</From> the SMTP server will not allow this, and hence the error.
As a test you can change the SSRS service user to myid#domain.com as a check to confirm this is the issue.
If so, you should investigate getting a domain user set up with a mailbox and running the SSRS service under that user.
Your other option is removing the Authentication option from the config (i.e. setting SMTPAuthenticate to 0) and allowing anonymous authentication to the SMTP server, though this might not be allowed in your environment.

SMTP mail error

Hello i have some problem when using SMTP mail using PHP.
when i am use mail function that time always it shows
errore Like "Unable to find the socket transport "http" - did you forget to enable it when you configured PHP?"
How can i slove this problem at (Project is on Cpanle)
Kindly help me
It would help to see a code snippet.
The error message suggests that you are using fsockopen() and passing it an http URL instead of an hostname.
You may also have an http url somewhere else (in your code or a config file) that is passed to fsockopen() at some point. Make sure your smtp server hostname doesn't start with http://.