471,624 Members | 1,824 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

having an error that is giving me problems when using mail function in php

Warning: mail() [function.mail]: Failed to connect to mailserver at "192.168.0.254" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\selection\Untitled-6.php on line 16
Mail Sent.
Sep 4 '08 #1
3 1375
dlite922
1,584 Expert 1GB
is that IP address a valid mail (SMTP) server?

If so, can you telnet to it on port 25?

How: open command line type telnet <ipaddress> 25

post the response here.
Sep 4 '08 #2
the SMTP is valid because it is the one we use to access our local mail on our mailserver.at 192.168.0.254

now for port 25 when i did the telnet thingy on port 25 like telnet 25
it is giving me this error:
could not open connection to the host,on port 23: connection failed
Sep 5 '08 #3
Expand|Select|Wrap|Line Numbers
  1. $from ="<!--EMAIL ADDRESS-->";
  2. $headers  = "From:" .$from. "\r\n";
  3. $headers .= "MIME-Version: 1.0\r\n";
  4. $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
  5.  
  6. mail($to,$subject,$txt,$headers);
  7. //$txt will contain the text want to sent in html format.
Jul 30 '14 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Wayno | last post: by
8 posts views Thread by Pierre Jelenc | last post: by
17 posts views Thread by Steve Jorgensen | last post: by
10 posts views Thread by Chris LaJoie | last post: by
reply views Thread by Usman | last post: by
669 posts views Thread by Xah Lee | last post: by
3 posts views Thread by Ibrahim. | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.