facebook

php email: CLOSED

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #338076 Reply

    Hi,

    I built an iPhone e-mail screen in MobiOne using .php code to process the e-mail.

    In MobiOne’s design window screen I have the “Form” box checked, “Form Action Type” set to URL, “Form Action URL” set to email.php, “Form Method” set to Post, and “Form Result Type” set to <None>.

    Question is: Why is it not sending an e-mail to me? When I click the “Send” button, a message “Loading…” will flicker a fraction of a second and nothing happens. There is no e-mail sent. PLEASE HELP! Thanks.

    My textbox on the screen and my email.php are defined as follows:

    textbox “nameField”
    textbox “emailField”
    textbox “messageArea”

    $yourEmail = “rob@volleyhollix.com”;
    $email = $_REQUEST[’emailField’] ;
    $name = $_REQUEST[‘nameField’] ;
    $subject = “Mobile Form Contact” ;
    $message = $_REQUEST[‘messageArea’] ;
    $message1 = “From:” . ‘ ‘ . $name . ‘
    MESSAGE: ‘ . $message ;
    phpmail($yourEmail, $subject, $message1, $email);
    return “Thank you for using our mail form”;

    #338086 Reply

    nvts
    Member

    Hello,

    Do you have a server to host the php file to send mail. Your screen will have to point to your php file with a submit button.

    Cheers…

    #338087 Reply

    Brandon
    Member

    The only thing I see is:
    phpmail($yourEmail, $subject, $message1, $email);
    should be
    mail($yourEmail, $subject, $message1, $email);

    #338089 Reply

    nvts
    Member

    Rob,

    I just remembered that Cincy has a php sample on his code list at the following.

    http://cincyplanet.com/mobione/#list:DEFAULT:4

    Cheers…

    #338092 Reply

    Hey Cincy,

    Yes, I’m aware it’s suppose to be “mail” and not “phpmail”.
    The only reason I used “phpmail” is because when I use “mail” to post this message here in this forum for some reason it kicks out with an error and therefore does not post it here…it’s weird.

    Anyways I do have it as “mail($yourEmail, $subject, $message1, $email);”

    nvts,

    What do you mean have a server to host the php file? by having the php file in my MobiOne’s “myApp-www” directory isn’t that where this php file suppose to be? Do I need the php file to be on a server so my screen can point to it?

    Thanks!

    #338095 Reply

    I need to get this done today. I know it’s simple and by doing this in this forum it drags too long.

    Can you please email me or I can call you so we can resolve this easily?

    My email is mailto:rob@volleyhollix.com. Please e-mail me and I can give you my cell#

    Thanks.

    #338101 Reply

    Hi Rob,

    Your php file must reside on your server. You should be aware that App Center (publish as mobile web application) is not a web server with script engine extensions such as php and jsp.

    #338104 Reply

    Octavio,

    Yes…got it! I was able to do this and it works….thanks!

    by the way… I have created a clear button on the e-mail page to clear all text boxes. I have the following java script but it does not work.

    I tried both these:

    m1-myEmailScreen-nameField = “”;
    nameField = “”;

    What is the correct way to do this?

    thanks.

    #338158 Reply

    Hi Rob,

    Since you stated in this topic you had success with this last question, I’ll mark this thread as closed.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: php email: CLOSED

You must be logged in to post in the forum log in