Re: Problem in sending email from localhost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes i am using local system, So now i changed as "localhost" instead of
smtp.gmail.com. But still i am getting the below error

*Warning*: mail() [function.mail <http://localhost/function.mail>]: SMTP
> server response: 550-5.7.1 [122.163.25.135] The IP you're using to send mail
> is not authorized to 550-5.7.1 send email directly to our servers. Please
> use the SMTP relay at your 550-5.7.1 service provider instead. Learn more at
> 550 5.7.1 http://mail.google.com/support/bin/answer.py?answer=10336he41si4092182ibb.18 in
>  *F:\test\xampp\htdocs\sendmail.php* on line*44*


I checked "phpinfo()" also. Its using the correct "php.ini" config file.

I checked this "etstat -ano | moren" command also. Its working fine. So it
shows that my server is working fine. Now i dont know what will be the
error. Anyway i  will post the modified new php.ini mail function part.

*[mail function]*
*; For Win32 only.*
*; http://php.net/smtp*
*SMTP = localhost*
*; http://php.net/smtp-port*
*smtp_port = 25*
*
*
*; For Win32 only.*
*; http://php.net/sendmail-from*
*sendmail_from = xxxxxxxxxx@xxxxxxxxx*
*
*
*
*
*; For Unix only.  You may supply arguments as well (default: "sendmail -t
-i").*
*; http://php.net/sendmail-path*
*;sendmail_path = "\"F:\test\xampp\sendmail\sendmail.exe\" -t"*
*
*
*; Force the addition of the specified parameters to be passed as extra
parameters*
*; to the sendmail binary. These parameters will always replace the value of
*
*; the 5th parameter to mail(), even in safe mode.*
*;mail.force_extra_parameters =*
*
*
*; Add X-PHP-Originating-Script: that will include uid of the script
followed by the filename*
*mail.add_x_header = Off*
*
*
*; Log all mail() calls including the full path of the script, line #, to
address and headers*
*;mail.log = "F:\test\xampp\apache\logs\php_mail.log" *
* *
*
*
Now i dont know what is wrong and why my message is not going....Please help
me

On Thu, Feb 3, 2011 at 7:10 PM, Tommy Pham <tommyhp2@xxxxxxxxx> wrote:

> 1)  Which SMTP server are you trying to use?  On your local system? Or
> smtp.gmail.com?
> 2a) If local system, which are are using?  MS' SMTP or 3rd party like
> hmail?
> Are you sure the server is configured properly and that the service is
> running?  Run this in command prompt:
>
> etstat -ano | moren
>
> You should see something like this:
>
> Proto  Local Address          Foreign Address        State           PID
>  TCP    0.0.0.0:25             0.0.0.0:0              LISTENING       2744
>
> If not, then that's your problem.  You don't have a SMTP server/service
> running.  Notice that last number.  If you're running MS' SMTP, in the
> taskmanager, it should match up with the process inetinfo.exe.  If you're
> using 3rd party, it should match up with their executable.  In the case of
> hmail, it should be hmailserver.exe.
>
> 2b)  If you're using gmail's, from the same system that your PHP code
> resides on, are you able able to connect to the gmail's SMTP using Outlook
> Express to check the validity of the account and no misconfigured
> firewalls/routers (both hardware and software)?
>
> 3)  Run phpinfo();  and check "Loaded Configuration File" to ensure that
> it's loading the right php.ini file.  Sometimes you think it loads the
> right
> one but it doesn't.  Don't assume.  Verify.  Then either scroll down or
> CTRL+F and look for 'SMTP'.  It should be as you configured it, that is if
> it loads the php.ini file from the correct location.
>
> FYI,  I suggest you stay away from non official packaged distributions as
> those tend to put things in places you'll least expect.  Getting the
> official distribution is strongly advised.  It may take you longer to
> understand and get things going.  But in the long run, that knowledge can
> further aid you as you can fine tune the configurations to your specific
> needs and also helps with the troubleshooting of various errors like the
> one
> you're having now.  Furthermore, should the need arise when you have to
> upgrade for any reason, you don't have to rely on non official distribution
> as sometimes those won't be updated quickly enough, especially when there's
> a security bug fix release.
>
> Regards,
> Tommy
>
>

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux