Loading ...
Sorry, an error occurred while loading the content.
 

Re: [phpXperts] WAMP ... PHP mail from locahost

Expand Messages
  • Arif Mahmud Rana
    I am assuming you are trying to send email from localhost for that you must have a mail server in your working pc. I use xampp s mercury to test mail in
    Message 1 of 6 , Nov 13, 2011
      I am assuming you are trying to send email from localhost for that you must have a mail server in your working pc. I use xampp's mercury to test mail in localhost.

      Process to send mail from localhost for testing purpose.
      1. Start your mercury server through xampp control panel.
      2. add a user from mercury's  configuration, manage local user. Give a username, Personal name and a password.
      3. Now open outlook express.
      4. Now go tools, account settings than click new.
      5. than click next than check manually configure server settings than click next.
      6. than click next. give your name, email address. if you have a user in mercury mail server like rasha than you will give mail address rasha@localhost. Incoming and outgoing mail servers will be localhost. now at logon information you have to give mercury server username and password like if you have user like rasha and password 1234 than you have to input that.
      7. now all set test it by clicking on send/receive.
      8. now test it using php code,
        <?php
        // The message
        $message "Line 1\nLine 2\nLine 3";

        // In case any of our lines are larger than 70 characters, we should use wordwrap()
        $message wordwrap($message70);

        // Send
        mail('rasha@...''My Subject'$message);
        ?>


      ARIF MAHMUD RANA

      From: bowlerbobuk <bobsharp@...>
      To: phpexperts@yahoogroups.com
      Sent: Monday, November 14, 2011 11:14 AM
      Subject: [phpXperts] WAMP ... PHP mail from locahost

       
      Hi

      I am trying to work out how to edit the PHP.ini file so that I can send emails from a webpage (Contact Form).

      I have 2 domains on the same hosted space, so can provide a "send from" email address.
      However, the pages I am editing are for a local charity and not yet hosted.

      My problem is that the email requires authentication.
      Where do I add the UserName and Password in the PHP.ini file ?

      cheers

      Bob Sharp



    • Arif Mahmud Rana
      Sorry I forget, to check mail click send/receive again in outlook and you will see the mail. ARIF MAHMUD RANA ________________________________ From: Arif
      Message 2 of 6 , Nov 14, 2011
        Sorry I forget, to check mail click send/receive again in outlook and you will see the mail.

        ARIF MAHMUD RANA


        From: Arif Mahmud Rana <rarifmahmudmr9@...>
        To: "phpexperts@yahoogroups.com" <phpexperts@yahoogroups.com>
        Sent: Monday, November 14, 2011 1:10 PM
        Subject: Re: [phpXperts] WAMP ... PHP mail from locahost

         
        I am assuming you are trying to send email from localhost for that you must have a mail server in your working pc. I use xampp's mercury to test mail in localhost.

        Process to send mail from localhost for testing purpose.
        1. Start your mercury server through xampp control panel.
        2. add a user from mercury's  configuration, manage local user. Give a username, Personal name and a password.
        3. Now open outlook express.
        4. Now go tools, account settings than click new.
        5. than click next than check manually configure server settings than click next.
        6. than click next. give your name, email address. if you have a user in mercury mail server like rasha than you will give mail address rasha@localhost. Incoming and outgoing mail servers will be localhost. now at logon information you have to give mercury server username and password like if you have user like rasha and password 1234 than you have to input that.
        7. now all set test it by clicking on send/receive.
        8. now test it using php code,
          <?php
          // The message
          $message "Line 1\nLine 2\nLine 3";

          // In case any of our lines are larger than 70 characters, we should use wordwrap()
          $message wordwrap($message70);

          // Send
          mail('rasha@...''My Subject'$message);
          ?>


        ARIF MAHMUD RANA

        From: bowlerbobuk <bobsharp@...>
        To: phpexperts@yahoogroups.com
        Sent: Monday, November 14, 2011 11:14 AM
        Subject: [phpXperts] WAMP ... PHP mail from locahost

         
        Hi

        I am trying to work out how to edit the PHP.ini file so that I can send emails from a webpage (Contact Form).

        I have 2 domains on the same hosted space, so can provide a "send from" email address.
        However, the pages I am editing are for a local charity and not yet hosted.

        My problem is that the email requires authentication.
        Where do I add the UserName and Password in the PHP.ini file ?

        cheers

        Bob Sharp





      • bowlerbobuk
        Sorry Using WAMP here, not Xamp. Don t have a mail server on board either (very primitive setup!) Trying to use my domain host as the server. Not sure how to
        Message 3 of 6 , Nov 14, 2011
          Sorry

          Using WAMP here, not Xamp.

          Don't have a mail server on board either (very primitive setup!)
          Trying to use my domain host as the server.

          Not sure how to add the authentication (UserName and password) to the PHP.ini file.

          cheers

          Bob



          --- In phpexperts@yahoogroups.com, Arif Mahmud Rana <rarifmahmudmr9@...> wrote:
          >
          > Sorry I forget, to check mail click send/receive again in outlook and you will see the mail.
          >
          > ARIF MAHMUD RANA
          >
          >
          >
          > ________________________________
          > From: Arif Mahmud Rana <rarifmahmudmr9@...>
          > To: "phpexperts@yahoogroups.com" <phpexperts@yahoogroups.com>
          > Sent: Monday, November 14, 2011 1:10 PM
          > Subject: Re: [phpXperts] WAMP ... PHP mail from locahost
          >
          >
          >  
          > I am assuming you are trying to send email from localhost for that you must have a mail server in your working pc. I use xampp's mercury to test mail in localhost.
          >
          > Process to send mail from localhost for testing purpose.
          >
          > 1. Start your mercury server through xampp control panel.
          > 2. add a user from mercury's  configuration, manage local user. Give a username, Personal name and a password.
          > 3. Now open outlook express.
          > 4. Now go tools, account settings than click new.
          > 5. than click next than check manually configure server settings than click next.
          > 6. than click next. give your name, email address. if you have a user in mercury mail server like rasha than you will give mail address rasha@localhost. Incoming and outgoing mail servers will be localhost. now at logon information you have to give mercury server username and password like if you have user like rasha and password 1234 than you have to input that.
          > 7. now all set test it by clicking on send/receive.
          > 8. now test it using php code,
          > <?php
          > // The message
          > $message = "Line 1\nLine 2\nLine 3";
          >
          > // In case any of our lines are larger than 70 characters, we should use wordwrap()
          > $message = wordwrap($message, 70);
          >
          > // Send
          > mail('rasha@...', 'My Subject', $message);
          > ?>
          >
          >
          > ARIF MAHMUD RANA
          >
          >
          > ________________________________
          > From: bowlerbobuk <bobsharp@...>
          > To: phpexperts@yahoogroups.com
          > Sent: Monday, November 14, 2011 11:14 AM
          > Subject: [phpXperts] WAMP ... PHP mail from locahost
          >
          >
          >  
          > Hi
          >
          > I am trying to work out how to edit the PHP.ini file so that I can send emails from a webpage (Contact Form).
          >
          > I have 2 domains on the same hosted space, so can provide a "send from" email address.
          > However, the pages I am editing are for a local charity and not yet hosted.
          >
          > My problem is that the email requires authentication.
          > Where do I add the UserName and Password in the PHP.ini file ?
          >
          > cheers
          >
          > Bob Sharp
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.