Skip to main content

Trying to Send Email from a PHP Script

Comments

7 comments

  • jimlongo
    This isn't really a server issue. I would ask this question at the HTML Help forums, you'll get some good help there.
    0
  • HSN-Saman
    [QUOTE]Line 49 would be require_once "../php/Mail.php"; It can't find the php/Mail.php file, but is there...
    You may check the permission and owner of those file that are not accessible by your application.
    0
  • gecasti
    Where can I find the php.ini file? How do I set the ROOT_PATH in cPanel?
    0
  • cPanelMichael
    Hello :) You may want to try using the full path to the included files. EX: /home/$username/public_html/path/to/file.php
    The php.ini file is stored at /usr/local/lib/php.ini by default. If you do not have root access, you can create your own php.ini file in /home/$username if your host uses a PHP handler that supports it. Thank you.
    0
  • gecasti
    cPanelMichael, I am pass that problem, now I need to configure PHP to use that mail server as its primary mail server. Where can I find the php.ini file so I can set the following options: <> SMTP " The hostname of your SMTP server; default is localhost <> smtp_port " The port for your SMTP server; default is 25 <> sendmail_from " The name and email to set for the from header <> sendmail_path " Path to sendmail or a sendmail-capable utility Currently I am getting the following failure: authentication failure [SMTP: Invalid response code received from server (code: 535, response: Incorrect authentication data)] Please advise, thanks.
    0
  • cPanelMichael
    Those values should be configured in your PHP script and not in the php.ini file. I recommend consulting with your web hosting provider for assistance because they can review the existing php.ini file if necessary, or troubleshoot the 535 error. Thank you.
    0
  • gecasti
    I got it working, thank you!!
    0

Please sign in to leave a comment.