php codeigniter mail function not working - php

i wa trying to do mail with php codeigner, but unfortunately its not working. the error which i got was the following; somebody please help me..
A PHP Error was encountered
Severity: Warning
Message: fsockopen() [function.fsockopen]: unable to connect to localhost:8025 (Connection refused)
Filename: libraries/smtp.php
Line Number: 105
Thanks in advance
Ahamed

Apparently you are trying to connect to port 8025, and this fails. The default smtp port is 25, so either you used the wrong port number or there is no mail service running on port 8025 on localhost, but whatever the cause this is something you should probably change in your configuration somewhere.
Another option is to change the mail protocol from smtp to native php mail, refer to the CodeIgniter docs on how to do this (and make sure you set this up correctly - especially if you are using Windows, check php.ini).

Related

php imap_open giving issues connecting

I am having some issues with imap_open.
This is the error I am getting:
Message: imap_open(): Couldn't open stream
{imap-mail.outlook.com:993/imap/ssl/novalidate-cert}INBOX
No matter if its imap using ssl on port 993 or pop ssl on port 995, I am getting the same error.
Message:
Unknown: Can't open mailbox
{imap-mail.outlook.com:993/imap/ssl/novalidate-cert}INBOX: invalid
remote specification (errflg=2)
I have the following setup:
Mac OSX Yosemite
Mamp Pro running PHP 5.6.10
Here is what I've done to troubleshoot:
I have apple mail setup to check my gmail account using imap ssl on port 993. I will assume if apple mail can retrieve mail, the port is open.
I went to Security and Privacy and did a PORT SCAN... 993 and 995 were not open... strange.
I do not have Mac Firewall enabled.
When using non ssl, on port 110 pop, this appears to be working fine.
Can anyone assist to see what may be the cause.
Check phpinfo() to see if php is complied --with-imap-ssl
http://www.bartvanasselt.nl/mamp-pro-using-imap-with-ssl/
Also can try tunneling:
Workaround for PHP IMAP functions? Trying to work with incoming email on localhost using XAMPP

PHPMailer error: "unable to connect to :25"

When I was trying to send an email using the PHPMailer class, I had the following error:
Warning: fsockopen() [function.fsockopen]: unable to connect to :25 (No connection could be made because the target machine actively refused it. ) in C:\Users\Testing\Downloads\PHPMailer\phpmailer\class.smtp.php on line 105
Can anyone help me?
unable to connect to :25 is an indication that you forgot to enter a server address in the configuration.
Make sure you are specifying a valid SMTP server address when initializing PHPMailer.

class.phpmailer.php SMTP -> ERROR: Failed to connect to server

I've been using class.phpmailer.php for some time but recently it stop working on my web server.
It is still working on my home computer but I guess that it's because I didn't update xampp.
The error returned is:
php SMTP -> ERROR: Failed to connect to server: A connection attempt
failed because the connected party did not properly respond after a
period of time, or established connection failed because connected
host has failed to respond. (10060)
I've also used this class eukhost and it sends the email with no errors.
I'm now going debugging class.phpmailer.php to see what is wrong.
But before I start, I would like to know if someone got this problem ans solved it.
If this had been working and now has recently stopped, it could be a temporary issue, or some settings for the mail server have been changed and you now need to update your settings.
The error message is telling you that it could not connect to the mail server. Socket error 10060 is a general operation timed out message.
You need to verify that the SMTP host and port numbers being used by phpmailer are correct. You should from another machine (or the same system running PHP) be able to telnet your-mail-server-here.com 25 where 25 represents the port number.
If you can't connect to the server, then the mail server is down or the hostname or port have changed. If you can connect from other systems but not from your PHP server, it is possible your IP has been blocked from the mail server, or a local/remote firewall are preventing your connection.
Hope that helps.

php mail invalid HELO name

i am trying to use localhost to send mail. however, i am getting this error when sending:
Warning: mail() [function.mail]: SMTP server response: 550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1). i have smtp settings correct in php.ini and am just confused as to what this means. thanks
There seem to be two primary reasons for this.
The first has to do with the email client configuration (google INVALID HELO OUTLOOK).
The other reason is an improperly configured SMTP server where the server sends out emails with only the server name and not a fully qualified name (e.g., emailserver vs emailserver.mydomain.com).
You should contact your hosting company and give them as much detail as you can. They should be able to help.
If you are using cPanel, you can disable HELO checking. See the user guide. The trade off is you will receive more spam...
I had a similar problem with postfix in Ubuntu. It turned out that I'd not set 'myhostname' in the postfix configuration file.
The problem disappeared when I configured 'myhostname' in the following file:
/etc/postfix/main.cf

imap is not connecting to mail server from live server but working fine from localhost

I could connect to a mail server from my localserver my when I uploaded that file to a server I am getting the following error
Notice: Unknown: rsh to IMAP server timed out (errflg=1) in Unknown on line 0
Notice: Unknown: Connection failed to mail.xxxxxxxxxxxxxxxxxxxx.com,143: Connection refused (errflg=2) in Unknown on line 0
Please help Thanks
Try using the ip address to connect instead of the domain name (mail.xxxxxxxxxxxxxxxxxxxx.com).
Is your server behind a firewall or a NAT router ? Otherwise does it resolve to the same IP when you try to look it up from the remote and local host ? Check with:
nslookup mail.xxxxxxxxxxxxxxxxxxxx.com
Server may miss or have broken libraries.
If you have a ssh-connection at server you could try to open an IMAP-connection over telnet. (Initiated from server).
Just google "telnet imap" and try a login. If success, library error, if no success. Firewall?

Categories