PHP emailing problem

Discussion in 'PHP' started by php_noobie, Jun 16, 2008.

  1. #1
    Hi guys I encountered the following error while trying to send email in PHP:

    Warning: mail() [function.mail]: Failed to connect to mailserver at "stmp.hotmail.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\paradigm\email.php on line 8

    My SMTP is already activated, and in php.ini, this is my mail function setting
    -----------------------------
    [mail function]
    ; For Win32 only.
    SMTP = stmp.hotmail.com
    smtp_port = 25

    ; For Win32 only.
    sendmail_from =

    ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
    ;sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

    ; Force the addition of the specified parameters to be passed as extra parameters
    ; to the sendmail binary. These parameters will always replace the value of
    ; the 5th parameter to mail(), even in safe mode.
    ;mail.force_extra_parameters =
    ----------------------------------

    Anyone knows what are the possible problems I am facing, and how to rectify
     
    php_noobie, Jun 16, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Should this: SMTP = stmp.hotmail.com

    Be this: SMTP = smtp.hotmail.com
     
    jestep, Jun 16, 2008 IP
  3. php_noobie

    php_noobie Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have edited the script, but still, the same error appeared

    Other than php.ini, what other things do I need to configure to get the SMTP server up and running?
     
    php_noobie, Jun 16, 2008 IP
  4. php_noobie

    php_noobie Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The funny thing is, the same msg:

    Warning: mail() [function.mail]: Failed to connect to mailserver at "stmp.hotmail.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\paradigm\email.php on line 8

    appears even after I have changed to smtp.hotmail.com
     
    php_noobie, Jun 16, 2008 IP
  5. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Restart your xamp server after editing the php.ini otherwise the changes may not be picked up
     
    ecentricNick, Jun 16, 2008 IP
  6. tanvir064

    tanvir064 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    pls give me the answer of my this problem.

    i am using Xampp webserver. i want to do mail using this webserver.

    my errror is here

    Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. p77sm3084004pyb.12

    pls give the solution as soon as possible.
     
    tanvir064, Jun 17, 2008 IP
  7. X.Homer.X

    X.Homer.X Peon

    Messages:
    290
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    it looks like you still didnt change that stmp to smtp. try it and see if it works.

    if not, restart your server, and try googling the error, if no results just post here and someone should be bound to figure it out.
     
    X.Homer.X, Jun 17, 2008 IP