Determining The Mail Server Settings Without Asking

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eros
    New Member
    • Jun 2007
    • 66

    Determining The Mail Server Settings Without Asking

    There is a way to determine the mail server settings needed by the mail() function of PHP. I got an error message "Failed to connect to mailserver". I learned from php.net that I need to configure the pnp.ini.

    Please help me to determine the following without asking somebody:
    1) SMTP = "localhost"
    2) smtp_port = "25"
    3) sendmail_from = NULL
    4) sendmail_path = NULL
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    Hi,

    Hmmm, can i see an extract of your code. This is the initiliser that i normally use.

    mail($to, $subject, $contents, $from_header);

    Kind Regards

    Comment

    • kovik
      Recognized Expert Top Contributor
      • Jun 2007
      • 1044

      #3
      Use Swiftmailer and your troubles will be over.

      Comment

      • eros
        New Member
        • Jun 2007
        • 66

        #4
        Originally posted by harshmaul
        Hi,

        Hmmm, can i see an extract of your code. This is the initiliser that i normally use.

        mail($to, $subject, $contents, $from_header);

        Kind Regards
        Actually I know that my code is running properly...I have no mail server setup in my local that's I got that error. I just need to know the above configuration in oreder to run mail() function of PHP. Maybe the Swifmailer... I will research about that.

        Comment

        Working...