php mail() and SMTP

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

    php mail() and SMTP

    Is there any way to set up the php mail() function so that it sends a
    username and password to the server? I'm on a winXP machine, and I have an
    SMTP provider, but it requires me to login to use it, and for some reason I
    can't find anything about it in the php.ini file.

    Many thanks,
    Leslie


  • Martin C. Petersen

    #2
    Re: php mail() and SMTP

    > Is there any way to set up the php mail() function so that it sends a[color=blue]
    > username and password to the server? I'm on a winXP machine, and I have an
    > SMTP provider, but it requires me to login to use it, and for some reason[/color]
    I[color=blue]
    > can't find anything about it in the php.ini file.[/color]
    You could try:



    Martin


    Comment

    • Leslie Hoare

      #3
      Re: php mail() and SMTP

      "Martin C. Petersen" <mcp@phys.au.dk > wrote in message
      news:3f22451a$0 $83047$edfadb0f @dtext01.news.t ele.dk...[color=blue]
      > You could try:
      > http://phpmailer.sourceforge.net/
      >
      >
      > Martin[/color]

      Thanks, I'll take a look :)


      Leslie


      Comment

      • Manuel Lemos

        #4
        Re: php mail() and SMTP

        Hello,

        On 07/26/2003 03:39 AM, Leslie Hoare wrote:[color=blue]
        > Is there any way to set up the php mail() function so that it sends a
        > username and password to the server? I'm on a winXP machine, and I have an
        > SMTP provider, but it requires me to login to use it, and for some reason I
        > can't find anything about it in the php.ini file.[/color]

        No, mail() does not support authetication.

        You may want to try this class that does exactly what you need. It comes
        with a sub-class for sending messages via SMTP directly and supports
        authentication.

        If you do not want to change your program much, you can use the
        smtp_mail() function that wraps around the class to emulate the mail()
        function but with the advantage of letting you set authentication
        credentials among other features.



        You also need this for doing the actual SMTP delivery:




        --

        Regards,
        Manuel Lemos

        Free ready to use OOP components written in PHP
        Free PHP Classes and Objects 2025 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

        Working...