smtp server counld not send mail in zend 2 - email

I have am using an SMTP mail server. When I register a new user, I recieve the following error message:
An error occurred
Could not open socket
Additional information:
Zend\Mail\Protocol\Exception\RuntimeException
File:
C:\wamp\www\zendtest\vendor\zendframework\zend-mail\src\Protocol\AbstractProtocol.php:209
Message:
Could not open socket
What should I do?

go to wamp->php->php.ini open this file and find ssl.dll after that remove ; symbol from starting of line. then save the file and restart the wamp. This is working for me.

Related

Soap perl and ssl certificate changed

I have a perl code that sends SOAP request through SOAP::Lite like this:
eval
{
$sresp = SOAP::Lite
->uri('http://machine/key')
->proxy('https://usr:pwd#website.com/addr/addr/remotescript.pl')
->remotescript_pl_function(#parms, $gmtime);
};
if ($#)
{
print $#;
}
After existing certificate for *.website.com has been replaced I am not getting valid responses anymore, I am getting
500 Can\'t connect to website.com:443 at localscript.pl line 123.
If I enable
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
everything works. But I would like to verify the SSL hostname, how can I do that, or track down the problem? (I am a little lost in this proxying).
I have c++ code with libcurl that goes along the same lines and works well. Entering https://website.com into browser works fine. Entering http://machine (machine is on local network) works.
edit 1:
Both perl -MIO::Socket::SSL=debug4 yourscript.pl and analyze-ssl.pl from p5-ssl-tools show error message 1416F086 which lead me to information that SSL certificate has "Chain issues" that have to be fixed in certificate installation.
edit 2:
After fix of the certificate is the error gone! Perfect, solved!
Here is solution mentioned in comments by Corion and Steffen Ullrich:
Running either:
https://github.com/noxxi/p5-ssl-tools script analyze-ssl.pl
perl -MIO::Socket::SSL=debug4 yourscript.pl
displayed same error: SSL connect attempt failed error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed. This pointed me to: telegram bot SSL error: SSL error {error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed} where I found that I too have "Chain issues Incomplete".
After fixing certificate the error is gone.

Indy10 HTTPS - socket error 10060 - connection timeout

I'm getting "Socket Error #10060, Connection timed out" when trying to access a https link.
Here is how you can reproduce it with INDY 10.6.2.0 and OpenSSL 1.0.2d DLLs (also happens with older Indy 10 version and dlls):
create a project and add a TButton, TIdHTTP and TMemo objects to the form
add to button onclick this code:
IdHTTP1.Request.UserAgent:='Indy';
IdHTTP1.HandleRedirects:=true;
Memo1.text:=IdHTTP1.Get('https://www.itv.com');`
now compile and run it, it will download correctly the file.
BUT if you are using a service like www.smartydns.com which redirects DNS request to their server, INDY sample above will not work and fail with "Socket Error #10060, Connection timed out" message.
Have tried it with WGET too (https://eternallybored.org/misc/wget/) and in version 1.13 its initializing the SSL handshake and freezes, but works without problems with version 1.15.
So the question is, what IdHTTP settings do I have to use to make it work, or is it a bug in Indy10 ?

Simple SMPP Perl Script

I need your help/advices on my very short script I wrote in Perl in order to send SMS via SMPP protocol.
I got a SMS gateway which is perfectly working (sending SMS via HTML request or via web interface works), let's say this gateway has IP 192.168.1.15.
Its SMPP service is listening to TCP 2775 (I can successfully telnet to 2775, so I guess SMPP service is working on my SMS gateway)
my $smpp = Net::SMPP->new_transmitter(192.168.1.15,
port=>2775,
system_id =>"administrator",
password =>"passwdexample") or die;
$resp_pdu = $smpp->submit_sm(destination_addr => '+400123456789',
short_message => 'test message') or die;
die "Response indicated error: " . $Resp_PDU->explain_status() if $resp_pdu->status;
When I run the script, here the error I got :
Response indicated error: Incorrect BIND Status for given command (ESME_RINVBNDS TS=0x00000004) at C:\temp\smpptest.pl line .
Unfortunately, I haven't find so much help on internet, but according to this link : SMPP Errors Codes It says :
You must bind first before any other request is handled.
However, my bind is done with new_transmitter, and I don't get any errors at this point, so I don't understand how it cannot bind the TCP session (my credentials are corrects, I tried that in a telnet session).
That's the first time I use such a plugin, so maybe I'm missing something, and maybe someone has already met this error !
Many thanks for your help :-)
Try to quote the IP address:
Net::SMPP->new_transmitter("192.168.1.15", ...);

Warning: mail(mail.log): failed to open stream: Permission denied in

I am trying to use the function mail in a server over windows with iss7 and i am getting this warning which doesn't let me send mails:
Warning: mail(mail.log): failed to open stream: Permission denied in xxxx
That line is:
mail("mail#myserver.com", "subject", 'body',"From: mail2#myserver.com")
At php.ini i have configured SMTP server, port and sendmail_from like this:
; http://php.net/smtp
SMTP = 128.x.x.xxx
; http://php.net/smtp-port
smtp_port = 110
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = mymail#myserver.com
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
mail.log = mail.log
I have also created a file called "mail.log" inside C:/php/ and i have changed permissions to write and read for all users.
Also, at phpinfo() safe_mode is Off.
I am currently sending mails with PHPMailer but it is soooo slow that i want to try it with mail function.
Do you know what am I doing wrong?
Thanks.
You should have a mail.log entry in your php.ini file which should log all the mail() function calls. Search for it and if you don't have this line, then it's taking some strange default or previously defined value, so you better define it and point it to the file you have created in your PHP folder and hopefully assigned good permissions to. For more check what phpinfo() is saying about mail.log.
For more info: mail configuration.

Mew gives SMTP error when trying to send through GMail

I'm trying to send an email using the GMail SMTP server.
I have the following setup for mew in emacs:
(default
(mailbox-type 'imap)
(proto "%")
(imap-user my-email)
(imap-server "imap.gmail.com")
(imap-ssl t)
(smtp-server "smtp.gmail.com")
(smtp-auth-list ("PLAIN" "LOGIN" "CRAM-MD5"))
(smtp-user my-email)
(user my-username)
(mail-domain "gmail.com")
(name my-name)
(imap-friend-folder "%from")
(imap-trash-folder "%[Gmail]/All Mail"))
I'm not sure what I'm doing wrong.
The error message is this: 530 5.7.0 Must issue a STARTTLS command first. dr7sm13115113qab.26. This mail has been queued to +queue
What mew configuration settings do I have to change to make this problem go away?
Looks like I forgot to set the variable smtp-ssl to t so that the SMTP connection uses SSL (which GMail requires).