Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Web Design (WordPress, Joomla, etc.) Problem with PHP Script Driven by Contact Form

  • Problem with PHP Script Driven by Contact Form

    Posted by Bruce Mackown on August 12, 2010 at 9:50 am

    Using a tutorial I found on Youtube, I developed a contact form for my website and a separate page with php script to produce an email to the webmaster when a visitor completes and submits the contact from.

    Unfortunately I’m getting an error message every time I try to test, and after googling the error message, which is “”warning: mail() [function.mail]: SMTP server response: 451 See https://pobox.com/~djb/docs/smtplf.html.” I see that other people are having the same problem but I can’t find a solution that works.

    One coincidence (or not) is we’re all hosted by godaddy.com.

    I’m not putting the actual PHP code because I don’t know if this is the right forum for this problem.

    Anyone got any ideas?

    Thanks.

    Bruce

    Jim Milina replied 14 years, 10 months ago 4 Members · 8 Replies
  • 8 Replies
  • Abraham Chaffin

    August 12, 2010 at 4:04 pm

    Hello Bruce,

    According to this webpage:
    https://www.theerrormessage.com/2007/12/warning-mail-smtp-server-response-451-see-httppoboxcomdjbdocssmtplfhtml-in-path_to_php_file-on-line/
    The problem is the line feed character on Windows. Take a look at that page and see if it helps.

    Abraham

  • Richard Williams

    August 12, 2010 at 7:59 pm

    Yes, you are in the right place and posting the code here would help and is ok to do

    Richard Williams
    p.s. Please remember to rate our post replies and tick if solved. Also, please remember that we here are NOT employed by Adobe, we do this out of love and fun, so its always nice to recieve a Please and Thank You! :o)

  • Bruce Mackown

    August 12, 2010 at 11:09 pm

    Richard,
    At your request, here is the PHP code that’s giving me problems:

    <?php

    /* Subject and Email Variables */

    $emailSubject = ‘Contact Form Forwarded From The Moto Channel’;
    $webMaster = ‘myname@hotmail.com’;

    /* Gathering Data Variables */

    $emailField = $_POST[’email’];
    $nameField = $_POST[‘name’];
    $subjectField = $_POST[‘subject’];
    $motorcycleField = $_POST[‘motorcycle’];
    $commentsField = $_POST[‘comments’];
    $newvideonotificationField = $_POST[‘newvideonotification’];

    $body = <<Thank you for contacting us. We will respond to you as soon as we can. You will return to The Moto Channel in a few seconds.

    EOD;
    echo “$theResults”;

    ?>

    Richard, for some reason Creative Cow is cutting off some of my code, I can see that it did it in the preview post, which I guess will just confuse things.

    line with $body = << is actually $body = <<

  • Bruce Mackown

    August 12, 2010 at 11:43 pm

    Richard,

    I just got off the phone with Godaddy tech support.

    He said the send email POST function I’m using doesn’t work on their Windows server unless I use their preformatted PHP script.

    He said that my script would work fine on their Linux server, and since it’s free to switch and only a few hours I told him to switch my website over to one of their Linux servers.

    Any thoughts on this matter?

    Thanks for your help!.

    Bruce

  • Bruce Mackown

    August 12, 2010 at 11:44 pm

    Abraham,

    I just got off the phone with Godaddy tech support.

    He said the send email POST function I’m using doesn’t work on their Windows server unless I use their preformatted PHP script.

    He said that my script would work fine on their Linux server, and since it’s free to switch and only a few hours I told him to switch my website over to one of their Linux servers.

    Any thoughts on this matter?

    Thanks for your help!.

    Bruce

  • Richard Williams

    August 13, 2010 at 1:10 am

    Sounds about right… Unless you are using ASP or other windows based systems its best to use linux IMO

    Richard Williams
    p.s. Please remember to rate our post replies and tick if solved. Also, please remember that we here are NOT employed by Adobe, we do this out of love and fun, so its always nice to recieve a Please and Thank You! :o)

  • Abraham Chaffin

    August 13, 2010 at 2:35 pm

    I prefer Linux servers over Windows servers so I say go for it.

    Abraham

  • Jim Milina

    July 4, 2011 at 11:49 pm

    i’ll thank you Richard.

    you and ALL the Creative Cow forum moderators/contributors do a GREAT job and provide informative, ACCURATE advice!

    thank again, AND again!

    …jim

    Jim Milina
    Little River Media

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy