This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

[closed] SMTP authentication?


  1. azgunfighter
    Member

    The install went as easy as possible. The sample form I created is working and collecting entries in the database just fine, but unfortunately the system is not sending email to the designated form recipient. The site is hosted on a windows 2003 server. In checking with tech support of the hosting company, they say that you have to use smtp authentication for emailing. How in the world would you set that up in machforms? It doesn't make sense as to why that would be necessary but that is what I am being told. Is anyone else using a windows server and had a similar problem? Any suggestions on how to resolve this so the desired user gets notified of form entries via email?

    Thanks for any assistance anyone might could provide.

    Larry
    azgnfighter

    Posted 17 years ago #
  2. azgunfighter
    Member

    Further discussion with my host company has revealed that they use the Pear API to handle the smtp process within PHP. Can you provide me with some help in determining what and how I can modify the application as necessary to resolve this issue.

    http://pear.php.net/package/Net_SMTP/docs

    Thanks,
    Larry

    Posted 17 years ago #
  3. yuniar

    Hello Larry,

    First, you will need to download this file http://www.appnitro.com/class.smtp.zip
    Unzip the file and upload it into your machform/lib folder.

    Second, edit your includes/helper-functions.php file, around line 437 you will find this code:

    $mail->Host     = "127.0.0.1";
    $mail->Mailer   = "mail";


    Replace that code with this one:

    $mail->SMTPAuth = true;
    $mail->Mailer   = "smtp";
    $mail->Host     = "127.0.0.1";
    $mail->Username = "your_username";
    $mail->Password = "your_password";


    Adjust the value of Host, Username and Password as needed.
    That should set the SMTP authentication.

    Sorry for this pain, I'll try to make this easier for the next version.

    Let me know if this doesn't work for you.


    MachForm Founder

    Posted 17 years ago #
  4. azgunfighter
    Member

    Ok I downloaded the file and made the changes you specified. When I tried the form afterwards, it resulted in the following error:

    Warning: fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:25 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) in D:\ultimaweb\apachetrail\apachetrailtours.com\wwwroot\machform\lib\class.smtp.php on line 105

    Warning: Cannot modify header information - headers already sent by (output started at D:\ultimaweb\apachetrail\apachetrailtours.com\wwwroot\machform\lib\class.smtp.php:105) in D:\ultimaweb\apachetrail\apachetrailtours.com\wwwroot\machform\view.php on line 33

    I am assuming that this is a connection error on my server's end. I tried changing the host address to the actual server name, i.e. mail.server.com and the error went away and the form processed correctly but no email has been received yet. Is that IP address a standard address? or can that be set differently by the hosting company?

    Thank you for your help with this.

    Larry

    Posted 17 years ago #
  5. yuniar

    Hmm.. try to ask your hosting company regarding the correct mail server address (could be standard address or ip address) and the port number.

    Usually the port number is 25. If you have different port number, add this line:

    $mail->Port = "your_port_number";

    If everything correct but you still didn't get the email, I'll need to check this directly.
    If you don't mind, send me your FTP login to yuniar [at] appnitro.com


    MachForm Founder

    Posted 17 years ago #
  6. yuniar

    Are you using Ultima Hosts? I found this snippet on their site:
    http://support.ultimahosts.net/Customer/KBArticle.aspx?articleid=20

    It's the code for sending email using ASP. It seem the configuration would be:

    $mail->SMTPAuth = true;
    $mail->Mailer   = "smtp";
    $mail->Host     = "mail.ultimahosts.com";
    $mail->Username = "name@yourdomain.com";
    $mail->Password = "your_password";


    MachForm Founder

    Posted 17 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.