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

Re: [bang-phpug] mail function not working

Expand Messages
  • Chaitanya Yanamadala
    *Warning: mail() [function.mail]: Failed to connect to mailserver at ... *phpdesigner_output_tmp.php on ... * based on this i told that he is using the
    Message 1 of 12 , Mar 3, 2010
    • 0 Attachment
      *Warning: mail() [function.mail]: Failed to connect to mailserver at
      > > "localhost" port 25, verify your "SMTP" and "smtp_port" setting in
      > php.ini
      > > or use ini_set() in E:\xampp\htdocs\test\*
      *phpdesigner_output_tmp.php on
      > line
      *

      based on this i told that he is using the XAMPP.....
      [?]

      Chaitanya

      "A man can get discouraged many times but he is not a failure until he stops
      trying..."

      "I would love to change the world, but I can't get the source code."




      On Wed, Mar 3, 2010 at 7:31 PM, munim2020 <munim2020@...> wrote:

      >
      >
      > Depends on if Manish is even using php on xampp :-)
      >
      > On 3 March 2010 18:39, Chaitanya Yanamadala <dr.virus.india@...<dr.virus.india%40gmail.com>
      > >wrote:
      >
      >
      > >
      > >
      > > u have to change these values in the php.ini file
      > > which will be available in the E:\xampp\php
      > >
      > > [mail function]
      > > ; For Win32 only.
      > > ; http://php.net/smtp
      > > SMTP = localhost
      > >
      > > ; http://php.net/smtp-port
      > > smtp_port = 25
      > >
      > > instead of localhost modify it to the ip address of the smtp server..
      > >
      > > this would send the mails
      > >
      > > Chaitanya
      > >
      > > "A man can get discouraged many times but he is not a failure until he
      > > stops
      > > trying..."
      > >
      > > "I would love to change the world, but I can't get the source code."
      > >
      > > On Wed, Mar 3, 2010 at 5:38 PM, manishyaar007 <manishyaar007@...<manishyaar007%40yahoo.co.in>
      > <manishyaar007%40yahoo.co.in>
      >
      > > >wrote:
      > >
      > >
      > > >
      > > >
      > > > hi guys,
      > > > i m very new in php . i want to send a mail using mail() function.
      > > > and using Free smtp server, but unable to send mail...
      > > >
      > > > i have very simple code
      > > >
      > > > <?php
      > > >
      > > > mail("xyz@... <xyz%40gmail.com> <xyz%40gmail.com> <xyz%
      > 40gmail.com>","hello
      >
      > > xyz","how r u this is a test
      > >
      > > > msg");
      > > >
      > > > ?>
      > > >
      > > > when i execute this the error like this is showing in browser
      > > >
      > > > Warning: mail() [function.mail]: Failed to connect to mailserver at
      > > > "localhost" port 25, verify your "SMTP" and "smtp_port" setting in
      > > php.ini
      > > > or use ini_set() in E:\xampp\htdocs\test\phpdesigner_output_tmp.php on
      > > line
      > > > 3
      > > >
      > > > its horrible .... pls help me.
      > > >
      > > >
      > > >
      > >
      > > [Non-text portions of this message have been removed]
      > >
      > >
      > >
      >
      > --
      > Abdul Munim Kazia
      > mail@... <mail%40munimkazia.com>
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >


      [Non-text portions of this message have been removed]
    • vijaya lakshmi
      Host it on the online server,only then you wil be able to send mail,the error is due to the abscence of the smtp server in localhost. Even I faced the same
      Message 2 of 12 , Mar 3, 2010
      • 0 Attachment
        Host it on the online server,only then you wil be able to send mail,the
        error is due to the abscence of the smtp server in localhost.
        Even I faced the same prob,made changes to smtp port but things didnt
        work,host it on to the main server and hopefully you wil not get any errors.

        On Wed, Mar 3, 2010 at 7:31 PM, munim2020 <munim2020@...> wrote:

        >
        >
        > Depends on if Manish is even using php on xampp :-)
        >
        > On 3 March 2010 18:39, Chaitanya Yanamadala <dr.virus.india@...<dr.virus.india%40gmail.com>
        > >wrote:
        >
        >
        > >
        > >
        > > u have to change these values in the php.ini file
        > > which will be available in the E:\xampp\php
        > >
        > > [mail function]
        > > ; For Win32 only.
        > > ; http://php.net/smtp
        > > SMTP = localhost
        > >
        > > ; http://php.net/smtp-port
        > > smtp_port = 25
        > >
        > > instead of localhost modify it to the ip address of the smtp server..
        > >
        > > this would send the mails
        > >
        > > Chaitanya
        > >
        > > "A man can get discouraged many times but he is not a failure until he
        > > stops
        > > trying..."
        > >
        > > "I would love to change the world, but I can't get the source code."
        > >
        > > On Wed, Mar 3, 2010 at 5:38 PM, manishyaar007 <manishyaar007@...<manishyaar007%40yahoo.co.in>
        > <manishyaar007%40yahoo.co.in>
        >
        > > >wrote:
        > >
        > >
        > > >
        > > >
        > > > hi guys,
        > > > i m very new in php . i want to send a mail using mail() function.
        > > > and using Free smtp server, but unable to send mail...
        > > >
        > > > i have very simple code
        > > >
        > > > <?php
        > > >
        > > > mail("xyz@... <xyz%40gmail.com> <xyz%40gmail.com> <xyz%
        > 40gmail.com>","hello
        >
        > > xyz","how r u this is a test
        > >
        > > > msg");
        > > >
        > > > ?>
        > > >
        > > > when i execute this the error like this is showing in browser
        > > >
        > > > Warning: mail() [function.mail]: Failed to connect to mailserver at
        > > > "localhost" port 25, verify your "SMTP" and "smtp_port" setting in
        > > php.ini
        > > > or use ini_set() in E:\xampp\htdocs\test\phpdesigner_output_tmp.php on
        > > line
        > > > 3
        > > >
        > > > its horrible .... pls help me.
        > > >
        > > >
        > > >
        > >
        > > [Non-text portions of this message have been removed]
        > >
        > >
        > >
        >
        > --
        > Abdul Munim Kazia
        > mail@... <mail%40munimkazia.com>
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >



        --
        Thanks & Regards
        Vijayalakshmi


        [Non-text portions of this message have been removed]
      • munim2020
        You could configure start SMTP on xampp.. i think MercuryMail supports it. ... -- Abdul Munim Kazia mail@munimkazia.com [Non-text portions of this message have
        Message 3 of 12 , Mar 3, 2010
        • 0 Attachment
          You could configure start SMTP on xampp.. i think MercuryMail supports it.

          On 4 March 2010 11:19, vijaya lakshmi <vijayalakshmi6jun@...> wrote:

          >
          >
          > Host it on the online server,only then you wil be able to send mail,the
          > error is due to the abscence of the smtp server in localhost.
          > Even I faced the same prob,made changes to smtp port but things didnt
          > work,host it on to the main server and hopefully you wil not get any
          > errors.
          >
          >
          > On Wed, Mar 3, 2010 at 7:31 PM, munim2020 <munim2020@...<munim2020%40gmail.com>>
          > wrote:
          >
          > >
          > >
          > > Depends on if Manish is even using php on xampp :-)
          > >
          > > On 3 March 2010 18:39, Chaitanya Yanamadala <dr.virus.india@...<dr.virus.india%40gmail.com>
          > <dr.virus.india%40gmail.com>
          >
          > > >wrote:
          > >
          > >
          > > >
          > > >
          > > > u have to change these values in the php.ini file
          > > > which will be available in the E:\xampp\php
          > > >
          > > > [mail function]
          > > > ; For Win32 only.
          > > > ; http://php.net/smtp
          > > > SMTP = localhost
          > > >
          > > > ; http://php.net/smtp-port
          > > > smtp_port = 25
          > > >
          > > > instead of localhost modify it to the ip address of the smtp server..
          > > >
          > > > this would send the mails
          > > >
          > > > Chaitanya
          > > >
          > > > "A man can get discouraged many times but he is not a failure until he
          > > > stops
          > > > trying..."
          > > >
          > > > "I would love to change the world, but I can't get the source code."
          > > >
          > > > On Wed, Mar 3, 2010 at 5:38 PM, manishyaar007 <
          > manishyaar007@... <manishyaar007%40yahoo.co.in><manishyaar007%
          > 40yahoo.co.in>
          > > <manishyaar007%40yahoo.co.in>
          >
          > >
          > > > >wrote:
          > > >
          > > >
          > > > >
          > > > >
          > > > > hi guys,
          > > > > i m very new in php . i want to send a mail using mail() function.
          > > > > and using Free smtp server, but unable to send mail...
          > > > >
          > > > > i have very simple code
          > > > >
          > > > > <?php
          > > > >
          > > > > mail("xyz@... <xyz%40gmail.com> <xyz%40gmail.com> <xyz%
          > 40gmail.com> <xyz%
          >
          > > 40gmail.com>","hello
          > >
          > > > xyz","how r u this is a test
          > > >
          > > > > msg");
          > > > >
          > > > > ?>
          > > > >
          > > > > when i execute this the error like this is showing in browser
          > > > >
          > > > > Warning: mail() [function.mail]: Failed to connect to mailserver at
          > > > > "localhost" port 25, verify your "SMTP" and "smtp_port" setting in
          > > > php.ini
          > > > > or use ini_set() in E:\xampp\htdocs\test\phpdesigner_output_tmp.php
          > on
          > > > line
          > > > > 3
          > > > >
          > > > > its horrible .... pls help me.
          > > > >
          > > > >
          > > > >
          > > >
          > > > [Non-text portions of this message have been removed]
          > > >
          > > >
          > > >
          > >
          > > --
          > > Abdul Munim Kazia
          > > mail@... <mail%40munimkazia.com> <mail%40munimkazia.com>
          >
          > >
          > > [Non-text portions of this message have been removed]
          > >
          > >
          > >
          >
          > --
          > Thanks & Regards
          > Vijayalakshmi
          >
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >



          --
          Abdul Munim Kazia
          mail@...


          [Non-text portions of this message have been removed]
        • kumar gaurav singh Sonu
          Hey buddy Don t be in tension...man just follow d following steps....First leave the php.ini file as it is...for the sake of mail
          Message 4 of 12 , Mar 3, 2010
          • 0 Attachment
            Hey buddy

            Don't be in tension...man just follow d following steps....


            First leave the php.ini file as it is...for the sake of mail function...
            [mail function]
            ; For Win32 only.
            SMTP = localhost
            smtp_port = 25
            .......................

            Now I think , the best way to setup your own smtp server is to use the services of "phpgmailer"...
            It provides all the features of mailing.......

            I am attaching with the mail , phpgmailer package/.........you just include the class....class.phpgmailer.php in your program , and can use the services..
            With this I'm also attaching a sample file...that uses this............."mail_gmail.php"...

            Enjoy man..............






            ________________________________
            From: manishyaar007 <manishyaar007@...>
            To: bang-phpug@yahoogroups.com
            Sent: Wed, March 3, 2010 5:38:06 PM
            Subject: [bang-phpug] mail function not working


            hi guys,
            i m very new in php . i want to send a mail using mail() function.
            and using Free smtp server, but unable to send mail...

            i have very simple code

            <?php

            mail("xyz@...","hello xyz","how r u this is a test msg");

            ?>

            when i execute this the error like this is showing in browser

            Warning: mail() [function.mail] : Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\xampp\htdocs\ test\phpdesigner _output_tmp. php on line 3

            its horrible .... pls help me.






            ----------

            <?php
            public class MovieMail
            {
            public function sendMail($str,$sub,$body)
            {
            include(".\phpgmailer\class.phpgmailer.php");
            $mail = new PHPGMailer();
            $mail->Username = 'yourmail@...';
            $mail->Password = 'password';
            $mail->From = 'frommail@...';
            $mail->FromName = 'Kumar Gaurav Singh';
            $mail->Subject = $sub;
            //Message to whome..
            $mail->AddAddress($str);


            $mail->Body = $body;
            //$mail->AddCC('kr_gaurav651@...');
            $mail->AddAttachment('C:\Users\gaurav\Desktop\shriya3h.jpg');
            //$mail->AddStringAttachment('file','C:\Users\gaurav\Desktop\shashi.java');
            //$mail->AddEmbeddedImage('20080818112718_jpg_a1aad5fd81840543bfc334d8d7cada14.jpg');
            if($mail->Send())
            echo'Check your mail';
            }

            }
            ?>

            [Non-text portions of this message have been removed]
          • Chaitanya Yanamadala
            where are the attachements.. how can u send a mail from the localhost server when the ports are blocked, can you explain me more in detail..?? Chaitanya A man
            Message 5 of 12 , Mar 4, 2010
            • 0 Attachment
              where are the attachements..
              how can u send a mail from the localhost server when the ports are blocked,
              can you explain me more in detail..??

              Chaitanya

              "A man can get discouraged many times but he is not a failure until he stops
              trying..."

              "I would love to change the world, but I can't get the source code."


              On Thu, Mar 4, 2010 at 12:15 PM, kumar gaurav singh Sonu <
              kr_gaurav651@...> wrote:

              >
              >
              > Hey buddy
              >
              > Don't be in tension...man just follow d following steps....
              >
              > First leave the php.ini file as it is...for the sake of mail function...
              >
              > [mail function]
              > ; For Win32 only.
              > SMTP = localhost
              > smtp_port = 25
              > .......................
              >
              > Now I think , the best way to setup your own smtp server is to use the
              > services of "phpgmailer"...
              > It provides all the features of mailing.......
              >
              > I am attaching with the mail , phpgmailer package/.........you just include
              > the class....class.phpgmailer.php in your program , and can use the
              > services..
              > With this I'm also attaching a sample file...that uses
              > this............."mail_gmail.php"...
              >
              > Enjoy man..............
              >
              > ________________________________
              > From: manishyaar007 <manishyaar007@...<manishyaar007%40yahoo.co.in>
              > >
              > To: bang-phpug@yahoogroups.com <bang-phpug%40yahoogroups.com>
              > Sent: Wed, March 3, 2010 5:38:06 PM
              > Subject: [bang-phpug] mail function not working
              >
              >
              > hi guys,
              > i m very new in php . i want to send a mail using mail() function.
              > and using Free smtp server, but unable to send mail...
              >
              > i have very simple code
              >
              > <?php
              >
              > mail("xyz@... <xyz%40gmail.com>","hello xyz","how r u this is a test
              > msg");
              >
              >
              > ?>
              >
              > when i execute this the error like this is showing in browser
              >
              > Warning: mail() [function.mail] : Failed to connect to mailserver at
              > "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
              > or use ini_set() in E:\xampp\htdocs\ test\phpdesigner _output_tmp. php on
              > line 3
              >
              > its horrible .... pls help me.
              >
              > ----------
              >
              > <?php
              > public class MovieMail
              > {
              > public function sendMail($str,$sub,$body)
              > {
              > include(".\phpgmailer\class.phpgmailer.php");
              > $mail = new PHPGMailer();
              > $mail->Username = 'yourmail@... <%27yourmail%40gmail.com>';
              > $mail->Password = 'password';
              > $mail->From = 'frommail@... <%27frommail%40gmail.com>';
              > $mail->FromName = 'Kumar Gaurav Singh';
              > $mail->Subject = $sub;
              > //Message to whome..
              > $mail->AddAddress($str);
              >
              >
              > $mail->Body = $body;
              > //$mail->AddCC('kr_gaurav651@... <%27kr_gaurav651%40yahoo.com>');
              > $mail->AddAttachment('C:\Users\gaurav\Desktop\shriya3h.jpg');
              > //$mail->AddStringAttachment('file','C:\Users\gaurav\Desktop\shashi.java');
              >
              > //$mail->AddEmbeddedImage('20080818112718_jpg_a1aad5fd81840543bfc334d8d7cada14.jpg');
              >
              > if($mail->Send())
              > echo'Check your mail';
              > }
              >
              > }
              > ?>
              >
              >
              > [Non-text portions of this message have been removed]
              >
              >
              >


              [Non-text portions of this message have been removed]
            • Hari KT
              Hi , Use swiftmailer . The site swiftmailer.org has a wonderful docs . You can create some other mail accounts ( for eg gmail ) and send mails . Enjoy ;) Hari
              Message 6 of 12 , Mar 4, 2010
              • 0 Attachment
                Hi ,

                Use swiftmailer .

                The site swiftmailer.org has a wonderful docs . You can create some other mail accounts ( for eg gmail ) and send mails . Enjoy ;)

                Hari K T

                http://harikt.com/





                ________________________________
                From: Chaitanya Yanamadala <dr.virus.india@...>
                To: bang-phpug@yahoogroups.com; kr_gaurav651@...
                Sent: Thu, 4 March, 2010 1:35:10 PM
                Subject: Re: [bang-phpug] mail function not working


                where are the attachements. .
                how can u send a mail from the localhost server when the ports are blocked,
                can you explain me more in detail..??

                Chaitanya

                "A man can get discouraged many times but he is not a failure until he stops
                trying..."

                "I would love to change the world, but I can't get the source code."

                On Thu, Mar 4, 2010 at 12:15 PM, kumar gaurav singh Sonu <
                kr_gaurav651@ yahoo.com> wrote:

                >
                >
                > Hey buddy
                >
                > Don't be in tension...man just follow d following steps....
                >
                > First leave the php.ini file as it is...for the sake of mail function...
                >
                > [mail function]
                > ; For Win32 only.
                > SMTP = localhost
                > smtp_port = 25
                > ............ ......... ..
                >
                > Now I think , the best way to setup your own smtp server is to use the
                > services of "phpgmailer" ...
                > It provides all the features of mailing..... ..
                >
                > I am attaching with the mail , phpgmailer package/.... .....you just include
                > the class....class. phpgmailer. php in your program , and can use the
                > services..
                > With this I'm also attaching a sample file...that uses
                > this........ ....."mail_ gmail.php" ...
                >
                > Enjoy man......... .....
                >
                > ____________ _________ _________ __
                > From: manishyaar007 <manishyaar007@ yahoo.co. in<manishyaar007% 40yahoo.co. in>
                > >
                > To: bang-phpug@yahoogro ups.com <bang-phpug% 40yahoogroups. com>
                > Sent: Wed, March 3, 2010 5:38:06 PM
                > Subject: [bang-phpug] mail function not working
                >
                >
                > hi guys,
                > i m very new in php . i want to send a mail using mail() function.
                > and using Free smtp server, but unable to send mail...
                >
                > i have very simple code
                >
                > <?php
                >
                > mail("xyz@... <xyz%40gmail. com>","hello xyz","how r u this is a test
                > msg");
                >
                >
                > ?>
                >
                > when i execute this the error like this is showing in browser
                >
                > Warning: mail() [function.mail] : Failed to connect to mailserver at
                > "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
                > or use ini_set() in E:\xampp\htdocs\ test\phpdesigner _output_tmp. php on
                > line 3
                >
                > its horrible .... pls help me.
                >
                > ----------
                >
                > <?php
                > public class MovieMail
                > {
                > public function sendMail($str, $sub,$body)
                > {
                > include(".\phpgmail er\class. phpgmailer. php");
                > $mail = new PHPGMailer() ;
                > $mail->Username = 'yourmail@gmail. com <%27yourmail% 40gmail.com> ';
                > $mail->Password = 'password';
                > $mail->From = 'frommail@gmail. com <%27frommail% 40gmail.com> ';
                > $mail->FromName = 'Kumar Gaurav Singh';
                > $mail->Subject = $sub;
                > //Message to whome..
                > $mail->AddAddress( $str);
                >
                >
                > $mail->Body = $body;
                > //$mail->AddCC('kr_gaurav651@ yahoo.com <%27kr_gaurav651% 40yahoo.com> ');
                > $mail->AddAttachmen t('C:\Users\ gaurav\Desktop\ shriya3h. jpg');
                > //$mail->AddStringA ttachment( 'file','C: \Users\gaurav\ Desktop\shashi. java');
                >
                > //$mail->AddEmbedde dImage('20080818 112718_jpg_ a1aad5fd81840543 bfc334d8d7cada14 .jpg');
                >
                > if($mail->Send( ))
                > echo'Check your mail';
                > }
                >
                > }
                > ?>
                >
                >
                > [Non-text portions of this message have been removed]
                >
                >
                >

                [Non-text portions of this message have been removed]





                Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/

                [Non-text portions of this message have been removed]
              • manishyaar007
                thank u guys for ur help, i got the solution of this problem, still when i send the mail using third party smtp server some time its works fine but but some
                Message 7 of 12 , Mar 8, 2010
                • 0 Attachment
                  thank u guys for ur help, i got the solution of this problem,
                  still when i send the mail using third party smtp server some time its works fine but but some time my mails are being sent to spam by the gmail.

                  apart form this i want to track the ip address of the person who send the mail to me , i m using $_Server['REMOTE_ADDR'], but i am getting
                  ::1 like address on my mail. is thier any solution for this....



                  --- In bang-phpug@yahoogroups.com, Hari KT <kthari85@...> wrote:
                  >
                  > Hi ,
                  >
                  > Use swiftmailer .
                  >
                  > The site swiftmailer.org has a wonderful docs . You can create some other mail accounts ( for eg gmail ) and send mails . Enjoy ;)
                  >
                  > Hari K T
                  >
                  > http://harikt.com/
                  >
                  >
                  >
                  >
                  >
                  > ________________________________
                  > From: Chaitanya Yanamadala <dr.virus.india@...>
                  > To: bang-phpug@yahoogroups.com; kr_gaurav651@...
                  > Sent: Thu, 4 March, 2010 1:35:10 PM
                  > Subject: Re: [bang-phpug] mail function not working
                  >
                  >
                  > where are the attachements. .
                  > how can u send a mail from the localhost server when the ports are blocked,
                  > can you explain me more in detail..??
                  >
                  > Chaitanya
                  >
                  > "A man can get discouraged many times but he is not a failure until he stops
                  > trying..."
                  >
                  > "I would love to change the world, but I can't get the source code."
                  >
                  > On Thu, Mar 4, 2010 at 12:15 PM, kumar gaurav singh Sonu <
                  > kr_gaurav651@ yahoo.com> wrote:
                  >
                  > >
                  > >
                  > > Hey buddy
                  > >
                  > > Don't be in tension...man just follow d following steps....
                  > >
                  > > First leave the php.ini file as it is...for the sake of mail function...
                  > >
                  > > [mail function]
                  > > ; For Win32 only.
                  > > SMTP = localhost
                  > > smtp_port = 25
                  > > ............ ......... ..
                  > >
                  > > Now I think , the best way to setup your own smtp server is to use the
                  > > services of "phpgmailer" ...
                  > > It provides all the features of mailing..... ..
                  > >
                  > > I am attaching with the mail , phpgmailer package/.... .....you just include
                  > > the class....class. phpgmailer. php in your program , and can use the
                  > > services..
                  > > With this I'm also attaching a sample file...that uses
                  > > this........ ....."mail_ gmail.php" ...
                  > >
                  > > Enjoy man......... .....
                  > >
                  > > ____________ _________ _________ __
                  > > From: manishyaar007 <manishyaar007@ yahoo.co. in<manishyaar007% 40yahoo.co. in>
                  > > >
                  > > To: bang-phpug@yahoogro ups.com <bang-phpug% 40yahoogroups. com>
                  > > Sent: Wed, March 3, 2010 5:38:06 PM
                  > > Subject: [bang-phpug] mail function not working
                  > >
                  > >
                  > > hi guys,
                  > > i m very new in php . i want to send a mail using mail() function.
                  > > and using Free smtp server, but unable to send mail...
                  > >
                  > > i have very simple code
                  > >
                  > > <?php
                  > >
                  > > mail("xyz@... <xyz%40gmail. com>","hello xyz","how r u this is a test
                  > > msg");
                  > >
                  > >
                  > > ?>
                  > >
                  > > when i execute this the error like this is showing in browser
                  > >
                  > > Warning: mail() [function.mail] : Failed to connect to mailserver at
                  > > "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
                  > > or use ini_set() in E:\xampp\htdocs\ test\phpdesigner _output_tmp. php on
                  > > line 3
                  > >
                  > > its horrible .... pls help me.
                  > >
                  > > ----------
                  > >
                  > > <?php
                  > > public class MovieMail
                  > > {
                  > > public function sendMail($str, $sub,$body)
                  > > {
                  > > include(".\phpgmail er\class. phpgmailer. php");
                  > > $mail = new PHPGMailer() ;
                  > > $mail->Username = 'yourmail@gmail. com <%27yourmail% 40gmail.com> ';
                  > > $mail->Password = 'password';
                  > > $mail->From = 'frommail@gmail. com <%27frommail% 40gmail.com> ';
                  > > $mail->FromName = 'Kumar Gaurav Singh';
                  > > $mail->Subject = $sub;
                  > > //Message to whome..
                  > > $mail->AddAddress( $str);
                  > >
                  > >
                  > > $mail->Body = $body;
                  > > //$mail->AddCC('kr_gaurav651@ yahoo.com <%27kr_gaurav651% 40yahoo.com> ');
                  > > $mail->AddAttachmen t('C:\Users\ gaurav\Desktop\ shriya3h. jpg');
                  > > //$mail->AddStringA ttachment( 'file','C: \Users\gaurav\ Desktop\shashi. java');
                  > >
                  > > //$mail->AddEmbedde dImage('20080818 112718_jpg_ a1aad5fd81840543 bfc334d8d7cada14 .jpg');
                  > >
                  > > if($mail->Send( ))
                  > > echo'Check your mail';
                  > > }
                  > >
                  > > }
                  > > ?>
                  > >
                  > >
                  > > [Non-text portions of this message have been removed]
                  > >
                  > >
                  > >
                  >
                  > [Non-text portions of this message have been removed]
                  >
                  >
                  >
                  >
                  >
                  > Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
                  >
                  > [Non-text portions of this message have been removed]
                  >
                • Chaitanya Yanamadala
                  is this the code which ur are using up.. Your ip:
                  Message 8 of 12 , Mar 8, 2010
                  • 0 Attachment
                    is this the code which ur are using up..

                    <font style="font-size: 10px;" face="Verdana">Your ip:
                    <?php
                    $ip = $_SERVER['REMOTE_ADDR'];
                    echo "$ip";
                    ?>
                    </font>


                    this should obivously get you the remote address of the server..

                    can u show me the code what u are using?


                    Chaitanya

                    "A man can get discouraged many times but he is not a failure until he stops
                    trying..."

                    "I would love to change the world, but I can't get the source code."



                    On Mon, Mar 8, 2010 at 2:07 PM, manishyaar007 <manishyaar007@...>wrote:

                    >
                    >
                    >
                    > thank u guys for ur help, i got the solution of this problem,
                    > still when i send the mail using third party smtp server some time its
                    > works fine but but some time my mails are being sent to spam by the gmail.
                    >
                    > apart form this i want to track the ip address of the person who send the
                    > mail to me , i m using $_Server['REMOTE_ADDR'], but i am getting
                    > ::1 like address on my mail. is thier any solution for this....
                    >
                    > --- In bang-phpug@yahoogroups.com <bang-phpug%40yahoogroups.com>, Hari KT
                    > <kthari85@...> wrote:
                    > >
                    > > Hi ,
                    > >
                    > > Use swiftmailer .
                    > >
                    > > The site swiftmailer.org has a wonderful docs . You can create some
                    > other mail accounts ( for eg gmail ) and send mails . Enjoy ;)
                    > >
                    > > Hari K T
                    > >
                    > > http://harikt.com/
                    > >
                    > >
                    > >
                    > >
                    > >
                    > > ________________________________
                    > > From: Chaitanya Yanamadala <dr.virus.india@...>
                    > > To: bang-phpug@yahoogroups.com <bang-phpug%40yahoogroups.com>;
                    > kr_gaurav651@...
                    > > Sent: Thu, 4 March, 2010 1:35:10 PM
                    > > Subject: Re: [bang-phpug] mail function not working
                    > >
                    > >
                    > > where are the attachements. .
                    > > how can u send a mail from the localhost server when the ports are
                    > blocked,
                    > > can you explain me more in detail..??
                    > >
                    > > Chaitanya
                    > >
                    > > "A man can get discouraged many times but he is not a failure until he
                    > stops
                    > > trying..."
                    > >
                    > > "I would love to change the world, but I can't get the source code."
                    > >
                    > > On Thu, Mar 4, 2010 at 12:15 PM, kumar gaurav singh Sonu <
                    > > kr_gaurav651@ yahoo.com> wrote:
                    > >
                    > > >
                    > > >
                    > > > Hey buddy
                    > > >
                    > > > Don't be in tension...man just follow d following steps....
                    > > >
                    > > > First leave the php.ini file as it is...for the sake of mail
                    > function...
                    > > >
                    > > > [mail function]
                    > > > ; For Win32 only.
                    > > > SMTP = localhost
                    > > > smtp_port = 25
                    > > > ............ ......... ..
                    > > >
                    > > > Now I think , the best way to setup your own smtp server is to use the
                    > > > services of "phpgmailer" ...
                    > > > It provides all the features of mailing..... ..
                    > > >
                    > > > I am attaching with the mail , phpgmailer package/.... .....you just
                    > include
                    > > > the class....class. phpgmailer. php in your program , and can use the
                    > > > services..
                    > > > With this I'm also attaching a sample file...that uses
                    > > > this........ ....."mail_ gmail.php" ...
                    > > >
                    > > > Enjoy man......... .....
                    > > >
                    > > > ____________ _________ _________ __
                    > > > From: manishyaar007 <manishyaar007@ yahoo.co. in<manishyaar007%
                    > 40yahoo.co. in>
                    > > > >
                    > > > To: bang-phpug@yahoogro ups.com <bang-phpug% 40yahoogroups. com>
                    > > > Sent: Wed, March 3, 2010 5:38:06 PM
                    > > > Subject: [bang-phpug] mail function not working
                    > > >
                    > > >
                    > > > hi guys,
                    > > > i m very new in php . i want to send a mail using mail() function.
                    > > > and using Free smtp server, but unable to send mail...
                    > > >
                    > > > i have very simple code
                    > > >
                    > > > <?php
                    > > >
                    > > > mail("xyz@... <xyz%40gmail. com>","hello xyz","how r u this is a test
                    > > > msg");
                    > > >
                    > > >
                    > > > ?>
                    > > >
                    > > > when i execute this the error like this is showing in browser
                    > > >
                    > > > Warning: mail() [function.mail] : Failed to connect to mailserver at
                    > > > "localhost" port 25, verify your "SMTP" and "smtp_port" setting in
                    > php.ini
                    > > > or use ini_set() in E:\xampp\htdocs\ test\phpdesigner _output_tmp. php
                    > on
                    > > > line 3
                    > > >
                    > > > its horrible .... pls help me.
                    > > >
                    > > > ----------
                    > > >
                    > > > <?php
                    > > > public class MovieMail
                    > > > {
                    > > > public function sendMail($str, $sub,$body)
                    > > > {
                    > > > include(".\phpgmail er\class. phpgmailer. php");
                    > > > $mail = new PHPGMailer() ;
                    > > > $mail->Username = 'yourmail@gmail. com <%27yourmail% 40gmail.com> ';
                    > > > $mail->Password = 'password';
                    > > > $mail->From = 'frommail@gmail. com <%27frommail% 40gmail.com> ';
                    > > > $mail->FromName = 'Kumar Gaurav Singh';
                    > > > $mail->Subject = $sub;
                    > > > //Message to whome..
                    > > > $mail->AddAddress( $str);
                    > > >
                    > > >
                    > > > $mail->Body = $body;
                    > > > //$mail->AddCC('kr_gaurav651@ yahoo.com <%27kr_gaurav651% 40yahoo.com>
                    > ');
                    > > > $mail->AddAttachmen t('C:\Users\ gaurav\Desktop\ shriya3h. jpg');
                    > > > //$mail->AddStringA ttachment( 'file','C: \Users\gaurav\
                    > Desktop\shashi. java');
                    > > >
                    > > > //$mail->AddEmbedde dImage('20080818 112718_jpg_ a1aad5fd81840543
                    > bfc334d8d7cada14 .jpg');
                    > > >
                    > > > if($mail->Send( ))
                    > > > echo'Check your mail';
                    > > > }
                    > > >
                    > > > }
                    > > > ?>
                    > > >
                    > > >
                    > > > [Non-text portions of this message have been removed]
                    > > >
                    > > >
                    > > >
                    > >
                    > > [Non-text portions of this message have been removed]
                    > >
                    > >
                    > >
                    > >
                    > >
                    > > Your Mail works best with the New Yahoo Optimized IE8. Get it NOW!
                    > http://downloads.yahoo.com/in/internetexplorer/
                    > >
                    > > [Non-text portions of this message have been removed]
                    > >
                    >
                    >
                    >


                    [Non-text portions of this message have been removed]
                  Your message has been successfully submitted and would be delivered to recipients shortly.