configuring Gmail smpt in php´

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • julian_m

    configuring Gmail smpt in php´

    Is there any way to set up the php.ini file, in order to be able to use
    gmail to send mails from a local machine?

    I've tryied with

    SMTP = smtp.gmail.com
    smtp_port = 25

    but I can't figure out where I've to write user and password data nor
    the place where I've to write the SSL data which Gmail waits for...

    regards - jm

  • NC

    #2
    Re: configuring Gmail smpt in php´

    julian_m wrote:[color=blue]
    >
    > Is there any way to set up the php.ini file, in order to be able
    > to use gmail to send mails from a local machine?
    >
    > I've tryied with
    >
    > SMTP = smtp.gmail.com
    > smtp_port = 25
    >
    > but I can't figure out where I've to write user and password data nor
    > the place where I've to write the SSL data which Gmail waits for...[/color]

    Consider using phpMailer instead:



    Cheers,
    NC

    Comment

    • julian_m

      #3
      Re: configuring Gmail smpt in php´


      NC wrote:[color=blue]
      > julian_m wrote:[color=green]
      > >
      > > Is there any way to set up the php.ini file, in order to be able
      > > to use gmail to send mails from a local machine?
      > >
      > > I've tryied with
      > >
      > > SMTP = smtp.gmail.com
      > > smtp_port = 25
      > >
      > > but I can't figure out where I've to write user and password data nor
      > > the place where I've to write the SSL data which Gmail waits for...[/color]
      >
      > Consider using phpMailer instead:
      >
      > http://phpmailer.sf.net/
      >[/color]

      Ahh, thanks, I'll give it a try

      regards - jm

      Comment

      • Manuel Lemos

        #4
        Re: configuring Gmail smpt in php´

        Hello,

        on 01/11/2006 01:46 AM julian_m said the following:[color=blue]
        > Is there any way to set up the php.ini file, in order to be able to use
        > gmail to send mails from a local machine?
        >
        > I've tryied with
        >
        > SMTP = smtp.gmail.com
        > smtp_port = 25
        >
        > but I can't figure out where I've to write user and password data nor
        > the place where I've to write the SSL data which Gmail waits for...[/color]

        Not with the mail function under Linux/Unix systems.

        You may want to try this MIME message class that comes with a wrapper
        function named smtp_mail(). That function emulates the mail() function
        but lets you send messages to a SMTP server of your choice and supports
        authentication.




        You also need this for SMTP delivery:



        and this for authentication:




        --

        Regards,
        Manuel Lemos

        Metastorage - Data object relational mapping layer generator


        PHP Classes - Free ready to use OOP components written in PHP
        Free PHP Classes and Objects 2026 Versions with PHP Example Scripts, PHP Tutorials, Download PHP Scripts, PHP articles, Remote PHP Jobs, Hire PHP Developers, PHP Book Reviews, PHP Language OOP Materials

        Comment

        • julian_m

          #5
          Re: configuring Gmail smpt in php´


          julian_m wrote:[color=blue]
          > NC wrote:[color=green][color=darkred]
          > > > but I can't figure out where I've to write user and password data nor
          > > > the place where I've to write the SSL data which Gmail waits for...[/color]
          > >
          > > Consider using phpMailer instead:
          > >
          > > http://phpmailer.sf.net/[/color][/color]

          I can't get logged in. I'm receiving the following message:

          Must issue a STARTTLS command first;
          The following From address failed: myaddress@gmail .com

          Note that I already have

          var $SMTPAuth = true;

          Any kind of help would be apreciated
          regards - jm

          Comment

          • julian_m

            #6
            Re: configuring Gmail smpt in php´


            julian_m wrote:[color=blue]
            > julian_m wrote:[color=green]
            > > NC wrote:[color=darkred]
            > > > > but I can't figure out where I've to write user and password data nor
            > > > > the place where I've to write the SSL data which Gmail waits for...
            > > >
            > > > Consider using phpMailer instead:
            > > >
            > > > http://phpmailer.sf.net/[/color][/color]
            >
            > I can't get logged in. I'm receiving the following message:
            >
            > Must issue a STARTTLS command first;
            > The following From address failed: myaddress@gmail .com
            >
            > Note that I already have
            >
            > var $SMTPAuth = true;
            >
            > Any kind of help would be apreciated
            > regards - jm[/color]

            mmm, i found an article in


            "Even though phpmailer supports SMTP authentication, it lacks the
            funtionality to use SSL connection. I couldn't use this class to
            connect to gmail SMTP server because it requires SSL connection. The
            only option left for me was to find out mail exchange servers of gmail
            and interact with it. This is alright because my requirement is only to
            send mail to a gmail account."

            So PHPmailer can't be used to send mails trough gmail servers right?

            regards - jm

            Comment

            • julian_m

              #7
              Re: configuring Gmail smpt in php´


              julian_m wrote:[color=blue]
              > julian_m wrote:[color=green]
              > > NC wrote:[color=darkred]
              > > > > but I can't figure out where I've to write user and password data nor
              > > > > the place where I've to write the SSL data which Gmail waits for...
              > > >
              > > > Consider using phpMailer instead:
              > > >
              > > > http://phpmailer.sf.net/[/color][/color]
              >
              > I can't get logged in. I'm receiving the following message:
              >
              > Must issue a STARTTLS command first;
              > The following From address failed: myaddress@gmail .com
              >
              > Note that I already have
              >
              > var $SMTPAuth = true;
              >
              > Any kind of help would be apreciated
              > regards - jm[/color]

              mmm, i found an article in


              "Even though phpmailer supports SMTP authentication, it lacks the
              funtionality to use SSL connection. I couldn't use this class to
              connect to gmail SMTP server because it requires SSL connection. The
              only option left for me was to find out mail exchange servers of gmail
              and interact with it. This is alright because my requirement is only to
              send mail to a gmail account."

              So PHPmailer can't be used to send mails trough gmail servers right?

              regards - jm

              Comment

              • john.d.mann@sbcglobal.net

                #8
                Re: configuring Gmail smpt in php´

                julian_m wrote:[color=blue]
                > Is there any way to set up the php.ini file, in order to be able to use
                > gmail to send mails from a local machine?
                >
                > I've tryied with
                >
                > SMTP = smtp.gmail.com
                > smtp_port = 25
                >
                > but I can't figure out where I've to write user and password data nor
                > the place where I've to write the SSL data which Gmail waits for...
                >
                > regards - jm
                >[/color]

                GMail doesn't use port 25, it's something else like 236... They use the
                TLS protocol to authenticate, and so you need to write code which will
                authenticate you before you can send outgoing mail through them. I
                looked into that once upon a time, but could not figure it all out. I
                gave up in the end, so I can't help you with a solution other than
                telling you that you need to look into TLS, which i'm not sure that PHP
                can handle... I could be wrong. Would love to see an update from you
                if you figure this one out, though :)

                John D. Mann

                Comment

                Working...