Hai,

i want to send mail from my localhost in php,i try to using my outlookexpress smtp and email parameters but it gives
warning like this
Warning: mail() [function.mail]: SMTP server response: 553 Sorry, that domain isn't in my list of allowed rcpthosts. in D:\wamp\www\mail.php on line 9

It's possible to send mail from localhost ,then what are the changes php. ini settings for sending mail

Thanks
Bala

    Does outlook have a SMTP server?

    Anyway u need to set sendmail_path in php.ini; path to your smtp server ...

      Hai Bogu,
      I give my SMTPserver path also
      like i change my config file like this
      SMTP = smtpout.secureserver.net
      smtp_port = 80
      sendmail_from= myemailaddress

      now also warning came
      Warning: mail() [function.mail]: SMTP server response: 553 Sorry, that domain isn't in my list of allowed rcpthosts. in D:\wamp\www\mail.php on line 9

      ini file where i give domain name

      Regards
      Bala

        If you're on Windows, you must use SMTP to send mail. Thus sendmail_path is ignored, because PHP does not support using sendmail to send mail on win32 (As most users won't have it installed)

        Therefore you'll need to set up and correctly configure a local MTA to relay messages to wherever they need to go; this is site-specific and needs to be set right.

        Talk to your network admin and ask them how to do this and what software to use. A lot of windows users seem to use the IIS SMTP server which works but is lousy at error reporting / logging (i.e. it doesn't do either).

        Mark

          Hai,
          If i have Apache also my system,if i use Apache server means What are the mail parameters i want to set in PHP.ini for send mail
          Give one Example easy for me

          Regards
          Bala

            I didn't understand that at all I'm afraid.

            Apache is a web server and is NOT a MTA (mail transfer agent). If you want to use your machine as a MTA (which you usually do if you're sending mail with PHP), then you must install one of those separately.

            Mark

              Hi,

              I don't know secureserver.net really good. But do you have to enable SMTP authentication in outlook ? If yes, then the usage of phpmailer or swift mailer can solve your problems.

              Thomas

                The mail port should be 25 not 80. 80 is for a webserver, change your php.ini to that and it should work. To test just send an e-mail to your self.
                The SMTP should be whatever you use to use you Outlook , Outlook Express or Thunderbird or whatever mail client you normally use to download your e-mail and send it with.

                  5 days later

                  If you want to use a Relay SMTP server to send the e-mail, then it is simple:

                  // path to smtp.php from XPM2 package
                  require_once 'path/smtp.php';
                  
                  $mail = new SMTP;
                  $mail->Delivery('relay');
                  $mail->Relay('relay-hostname.net', 'username', 'password', 465, 'autodetect', 'tls');
                  $mail->From('username@relay-hostname.net');
                  $mail->AddTo('client@destination.com');
                  $mail->Text('text/plain version of the message');
                  $sent = $mail->Send('Subject');
                  echo $sent ? 'Success' : $mail->result;
                  

                  For more details: http://xpertmailer.sourceforge.net/DOCUMENTATION

                    4 days later
                    Write a Reply...