PHP mail() configuration
-
Hi all, There are so many articles on the web about 'how to send mails in PHP' using the mail function. But actually it gives lots of errors for me. Have a look at the code segment I tried.
$to = "to@gmail.com"; $subject = "subject goes here"; $message = "message of the email goes here"; $from = "from@gmail.com"; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Mail Sent ";
When i try the code, gives the following error.
Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.emailsrvr.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\WorkOn\PHP\MyPHPSites\emai_test.php on line 10
How can I workaround with this? Thanks in advance.
I appreciate your help all the time... CodingLover :)
CodingLover wrote:
How can I workaround with this?
Check why the server smtp.emailsrvr.com is not accepting your mail request. I just tested it and it hangs after the
HELO
command, and then drops the connection. You need to contact the site administrator.Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
-
Hi all, There are so many articles on the web about 'how to send mails in PHP' using the mail function. But actually it gives lots of errors for me. Have a look at the code segment I tried.
$to = "to@gmail.com"; $subject = "subject goes here"; $message = "message of the email goes here"; $from = "from@gmail.com"; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Mail Sent ";
When i try the code, gives the following error.
Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.emailsrvr.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\WorkOn\PHP\MyPHPSites\emai_test.php on line 10
How can I workaround with this? Thanks in advance.
I appreciate your help all the time... CodingLover :)
-
CodingLover wrote:
How can I workaround with this?
Check why the server smtp.emailsrvr.com is not accepting your mail request. I just tested it and it hangs after the
HELO
command, and then drops the connection. You need to contact the site administrator.Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
No the request accepting. But no luck. I'll check with a different connection if possible, and let you know.
I appreciate your help all the time... CodingLover :)
-
I couldn't find any example in that download bundle. However I tried what that tutorial suggest but it didn't work either.
Fatal error: Cannot access empty property in ...\phpmailer\phpmailer.inc.php on line 271
I appreciate your help all the time... CodingLover :)
-
No the request accepting. But no luck. I'll check with a different connection if possible, and let you know.
I appreciate your help all the time... CodingLover :)
CodingLover wrote:
No the request accepting.
I'm not sure what you mean by this, but when I tried to connect manually it definitely timed out on the initial
HELO
command, and then dropped the connection. You need to check with the site what the correct connection protocol is - it may be that you need to use a different port.Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
-
CodingLover wrote:
No the request accepting.
I'm not sure what you mean by this, but when I tried to connect manually it definitely timed out on the initial
HELO
command, and then dropped the connection. You need to check with the site what the correct connection protocol is - it may be that you need to use a different port.Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
Yes, when I try to telnet to the port it is not allowed to connect. Seems my settings are invalid or the connection dropped somehow by my network. I'll check and let you know.
I appreciate your help all the time... CodingLover :)
-
Yes, when I try to telnet to the port it is not allowed to connect. Seems my settings are invalid or the connection dropped somehow by my network. I'll check and let you know.
I appreciate your help all the time... CodingLover :)
Did you telnet to port 25?
Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
-
I couldn't find any example in that download bundle. However I tried what that tutorial suggest but it didn't work either.
Fatal error: Cannot access empty property in ...\phpmailer\phpmailer.inc.php on line 271
I appreciate your help all the time... CodingLover :)
follow the instruction link
-
Did you telnet to port 25?
Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
Yes I do, but the connection is fail. Seems my network not allowed to connect.
I appreciate your help all the time... CodingLover :)
-
CodingLover wrote:
No the request accepting.
I'm not sure what you mean by this, but when I tried to connect manually it definitely timed out on the initial
HELO
command, and then dropped the connection. You need to check with the site what the correct connection protocol is - it may be that you need to use a different port.Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
I think sometimes very troublesome, often mailbox can receive and send http://www.lint-roller.net http://www.u-joint.net http://www.snap-blade.com http://www.auto-control-cable.com http://www.universal-fastener.com http://www.poly-silicon.comt